#UnknownID37. 1IXMMMl3PUlOWg#`|)?
1IXMMMl3PUlOWg#`|)?
Statement
The king's birthday dinner was attended by guests. The dinner was quite a success: every person has eaten several dishes (though the number of dishes was the same for every person) and every dish was served alongside with a new set of kitchen utensils.
All types of utensils in the kingdom are numbered from to . It is known that every set of utensils is the same and consist of different types of utensils, although every particular type may appear in the set at most once. For example, a valid set of utensils can be composed of one fork, one spoon and one knife.
After the dinner was over and the guests were dismissed, the king wondered what minimum possible number of utensils could be stolen. Unfortunately, the king has forgotten how many dishes have been served for every guest but he knows the list of all the utensils left after the dinner. Your task is to find the minimum possible number of stolen utensils.
Format
Input
The first line contains two integer numbers and ( ) — the number of kitchen utensils remaining after the dinner and the number of guests correspondingly.
The next line contains integers ( ) — the types of the utensils remaining. Equal values stand for identical utensils while different values stand for different utensils.
Output
Output a single value — the minimum number of utensils that could be stolen by the guests.
Sample
5 2
1 2 2 1 3
1
10 3
1 3 3 1 3 5 5 5 5 100
14
相关
在下列比赛中: