Little girl Susie went shopping with her mom and she wondered how to improve service quality. 

There are *n* people in the queue. For each person we know time *t*<sub class="lower-index">*i*</sub> needed to serve him. A person will be disappointed if the time he waits is more than the time needed to serve him. The time a person waits is the total time when all the people who stand in the queue in front of him are served. Susie thought that if we swap some people in the queue, then we can decrease the number of people who are disappointed. 

Help Susie find out what is the maximum number of not disappointed people can be achieved by swapping people in the queue.
The first line contains integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>).

The next line contains *n* integers *t*<sub class="lower-index">*i*</sub> (1 ≤ *t*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>), separated by spaces.
n=int(input())
queue=list(map(int,input().split()))
queue.sort()
people=2
time=queue[0]+queue[1]

i=2
while time < queue[n-1]:
    if time<=queue[i]:
        people+=1
        tiime+=queue[i]
    else:
        i+=1
        while i<n:
            if queue[i]<time:
                i+=1
            else:
                break
        if i=n:
            break
        else:
            people+=1
            time+=queue[i]
    i+=1
          
print(people)