Problem F
Blaðra
Languages
en
is

In Forritunarkeppni Framhaldsskólanna all teams get a balloon for each problem they solve, the balloons being different colours depending on what problem was solved.
This year there will be
Hannes was one of the people hired to inflate balloons this year and had to work hard since so many people solved his problem. He found this unfair since he was paid the same amount as everyone else.
After the contest Hannes thinks:
What problem could I have been assigned in order to do the least work?
Could you answer this question for Hannes?
Input
The first line of the input contains two integers
Output
Print a single integer, the minimum number of balloons Hannes could have had to inflate.
Scoring
Group |
Points |
Constraints |
1 |
50 |
|
2 |
50 |
No further constraints |
Sample Input 1 | Sample Output 1 |
---|---|
2 3 1 1 2 1 3 2 |
1 |
Sample Input 2 | Sample Output 2 |
---|---|
3 5 1 1 2 1 3 1 4 1 5 2 |
0 |