Mike is playing a strange video game!
There are
In one attack, Mike can select a subset of the
Mike wants to attack the enemies as many times as possible. Can you help Mike find the maximum number of times he can perform an attack?
Constraints
Subtask 1 [20%]
Subtask 2 [40%]
Subtask 3 [40%]
No additional constraints.
Input Specification
The first line contains a two space separated integer containing the values of
The next line contains
Output Specification
On a single line, print the maximum possible number of attacks which can be performed.
Sample Input
3 2
5 12 10
Sample Output
2
Explanation
For the first attack, Mike can choose the first and third enemies in his subset, and choose
For the second attack, Mike can choose the second and third enemies in his subset, and choose
At this point, Mike cannot perform any more attacks. It can be shown that
Comments