Farmer John wants to prepare some amount of lemonade in advance, but he does not want to be wasteful. The number of cows who join the line might depend on the order in which they arrive. Help him find the minimum possible number of cows who join the line.
SAMPLE INPUT:
5
7 1 400 2 2
SAMPLE OUTPUT:
3
In this setting, only three cows might end up in line (and this is the smallest possible). Suppose the cows with w=7w=7 and w=400w=400 arrive first and wait in line. Then the cow with w=1w=1 arrives and turns away, since 2 cows are already in line. The cows with w=2w=2 then arrive, one staying and one turning away.