After many years of continuous warfare, the country of Collea was left in shambles. This has caused food shortages and famines all across the country. In an attempt to distribute the little food that was produced and prevent food hoarding, the Collean government limited the amount of food that any one person can buy. Soon, Collean citizens are forced to wait in long lines in order to obtain the food they needed. There are currently
Constraints
Input Specification
The first line contains two positive integers,
The second line contains
Output Specification
Print
Sample Input
5 3
2 2 3 3 3
Sample Output
2
2
3
Comments
the second line in input indicates the number of people in each line. Thx.
This comment is hidden due to too much negative feedback. Show it anyway.
Solution: