Bob is now so rich that he has been invited to the exclusive Proletarian Partnership. Everyone in the partnership is so rich that PetaPounds (equivalent to ) are used to measure wealth. However, Bob is not satisfied with just being part of the Proletarian Partnership. He wants to be as rich as possible compared to its members.
More specifically, Bob wants to maximize the value of , where is Bob's wealth and is the average wealth of all the members in the partnership, including Bob. In order to accomplish this, Bob has broken into the Central Bank of the Proletarians, which contains the entire life savings of Bob and the other members of the partnership, each in a separate safe. Each safe is made of high quality mahogany, and thus cannot be opened with brute force. Instead, Bob decides to set the safes on fire (excluding his own, of course), destroying all of the money inside. However, once somebody's safe has been destroyed, they will be considered too poor to be part of the partnership and thus promptly kicked out. Can you help determine the minimum number of safes Bob has to burn?
Input Specification
The first line of input will contain two space-separated integers and .
The next lines will each contain an integer , the amount of money in the safe.
For at least of the marks, .
Output Specification
Output a single integer, the minimum number of safes Bob has to destroy to maximize .
Sample Input
50 4
100
150
280
10
Sample Output
3
Explanation
Bob must destroy all the safes except the safe with 10 PetaPounds in order to achieve a value of 30 for .
Comments