Dividing a Number Based on the Size of the Groups