**Answer:** 3,672.

The actual number of adults and children doesn't actually matter!

If all of the people were adults then half of them (306) would be given 12 sweets:

306 x 12 = 3672

If all of the people were children then three quarters of them (459) would be given 8 sweets:

459 x 8 = 3672

If there were 512 adults (so 256 would get 12 sweets = 3072) and 100 children (so 75 would get 8 sweets = 600):

256 x 12 + 75 x 8 = 3672

We can change the numbers of adults and children, but it doesn't change the answer. The reason for this lies in the fact that 1/2 adults x 12 sweets = 3/4 children x 8 sweets (both are 6).