- Time limit: 1.00 s
- Memory limit: 512 MB
Uolevi has n stones with weights w_1, w_2, \ldots, w_n. Uolevi wants to stack some of the stones on top of each other. The stack has to satisfy the property that for every stone, the sum of weights of stones on top of it is less than the weight of the stone. Calculate the maximum number of stones Uolevi can stack on top of each other.
Input
The first line of input contains one integer, n, the number of stones. The second line contains n integers, w_1, w_2, \ldots, w_n, the weights of the stones.
Output
Output the maximum number of the stones that can be stacked on top of each other.
Constraints
- 1 \le n \le 10^5
- 1 \le w_i \le 10^9
Examples
Input:
5 3 20 5 8 6
Output:
3
Uolevi can select stones with weights 3, 5, 20.
Input:
5 3 4 5 6 7
Output:
2
Input:
3 1 2 4
Output:
3