import sys



N = int(sys.stdin.readline().strip())

A = list(map(int, sys.stdin.readline().strip().split()))



A.sort()



acum = 0

ans = 0

for i in range(N-1):

    acum += A[i]

    if acum * 2 >= A[i+1]:

        ans += 1

    else:

        ans = 0



print((ans+1))
import sys



input = sys.stdin.readline



N = int(eval(input()))

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



A.sort()

# print(A)

ans = 0



acum = 0

for i in range(N-1):

    acum += A[i]

    if acum * 2 < A[i+1]:

        ans = 0

    else:

        ans += 1



print((ans + 1))
import sys

N = int(sys.stdin.readline().strip())
A = list(map(int, sys.stdin.readline().strip().split()))
A.sort()
acum = 0
ans = 0
for i in range(N - 1):
    acum += A[i]
    if acum * 2 >= A[i + 1]:
        ans += 1
    else:
        ans = 0
print((ans + 1))

import sys

input = sys.stdin.readline
N = int(eval(input()))
A = list(map(int, input().split()))
A.sort()
# print(A)
ans = 0
acum = 0
for i in range(N - 1):
    acum += A[i]
    if acum * 2 < A[i + 1]:
        ans = 0
    else:
        ans += 1
print((ans + 1))

-N = int(sys.stdin.readline().strip()) -A = list(map(int, sys.stdin.readline().strip().split())) +input = sys.stdin.readline +N = int(eval(input())) +A = list(map(int, input().split())) +# print(A) +ans = 0 -ans = 0 -    if acum * 2 >= A[i + 1]: +    if acum * 2 < A[i + 1]: +        ans = 0 +    else: -    else: -        ans = 0