I have to create a web page with a big div (grey colored) and many divs (black colored) near it (float left).

At the moment I’m using a margin (margin-right) which divides the black divs.
(I don’t mind about the grey div because it’s done.)
My problem is that the most right div for each row must not have the margin-right because i haven’t got any more space to give it.
I can’t create a specific class (margin-right: 0) for them because all the black divs will be added dynamically.
Is there any solution to my problem?
http://jsfiddle.net/aFkfm/1/
HTML:
CSS: