Fito's family is organizing some candies they still have from last year's Halloween because they would rather make a deal with the kids than have them do a trick.
They have several types of candy and from each type, they have several candies. So the kids don't get angry they want to give the same amount of candy per type to each of them. However, depending on how many children there are, this may not be possible. That's why they decide to get rid of all candies of certain types, in order to be able to distribute the remaining candies between at least 2 children. Logically, there are several ways to do this but they want to eliminate in total as few candies as possible.
Your task is to write a program that tells Fito what is the maximum number of candies they can keep.
In the first example, the family can remove the first and third types. Then they will keep $2 + 4=6$ candies. Both $2$ and $4$ can be equally distributed between at least $2$ kids.