from sys import stdin

from itertools import accumulate

n = int(stdin.readline().rstrip())

li = list(map(int,stdin.readline().rstrip().split()))

li.sort()

lin = list(accumulate(li))

point = 1

for i in range(n-1):

    if lin[i]*2 >= li[i+1]:

        point += 1

    else:

        point = 1

print(point)
from itertools import accumulate



n = int(eval(input()))

a = list(map(int,input().split()))



a.sort()



b = list(accumulate(a))



point = 0



for i in range(n-1):

    if b[i]*2 >= a[i+1]:

        point += 1

    else:

        point = 0



print((point+1))
from sys import stdin
from itertools import accumulate

n = int(stdin.readline().rstrip())
li = list(map(int, stdin.readline().rstrip().split()))
li.sort()
lin = list(accumulate(li))
point = 1
for i in range(n - 1):
    if lin[i] * 2 >= li[i + 1]:
        point += 1
    else:
        point = 1
print(point)

from itertools import accumulate

n = int(eval(input()))
a = list(map(int, input().split()))
a.sort()
b = list(accumulate(a))
point = 0
for i in range(n - 1):
    if b[i] * 2 >= a[i + 1]:
        point += 1
    else:
        point = 0
print((point + 1))

-from sys import stdin -n = int(stdin.readline().rstrip()) -li = list(map(int, stdin.readline().rstrip().split())) -li.sort() -lin = list(accumulate(li)) -point = 1 +n = int(eval(input())) +a = list(map(int, input().split())) +a.sort() +b = list(accumulate(a)) +point = 0 -    if lin[i] * 2 >= li[i + 1]: +    if b[i] * 2 >= a[i + 1]: -        point = 1 -print(point) +        point = 0 +print((point + 1))