A kind old person decided to give 12 sweets to each of the adults in the town, and 8 sweets to each of the children.
Of the 612 people in the town, exactly half of the adults, and exactly three quarters of the children took the sweets.
How many sweets did the kind old person have to buy?