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())  # 输入队伍数量
times = list(map(int, input().split()))  # 输入每支队伍完成比赛所需的时间
times.sort()  # 将完成时间从小到大排序

result = 0  # 初始化完成比赛的队伍数量为0
last_time = 0  # 初始化上一支队伍的完成时间为0
for i in range(n):
    if times[i] >= last_time:
        result += 1  # 如果下一支队伍的完成时间大于等于上一支队伍的完成时间，则认为他们可以同时进行比赛
        last_time += times[i]  # 更新上一支队伍的完成时间为下一支队伍的完成时间

print(result)  # 输出最大可以同时进行比赛的队伍数量


    
                
                
            
        
    
    






