import numpy as np



N = int(eval(input()))

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



A = sorted(A)

C = np.cumsum(A)



ans = 0

cnt = 0



for i in range(N-1) :

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

        cnt += 1

    else :

        cnt = 0



ans = cnt + 1



print(ans)

    
N = int(eval(input()))

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



A = sorted(A)



ans = 1



cum = [0]*N

for i, a in enumerate(A) :

    if i == 0 :

        cum[i] = a

    

    else :

        cum[i] = cum[i-1] + a



for i in range(N-2,-1,-1) :

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

        ans += 1

    else :

        break

print(ans)

import numpy as np

N = int(eval(input()))
A = list(map(int, input().split()))
A = sorted(A)
C = np.cumsum(A)
ans = 0
cnt = 0
for i in range(N - 1):
    if C[i] * 2 >= A[i + 1]:
        cnt += 1
    else:
        cnt = 0
ans = cnt + 1
print(ans)

N = int(eval(input()))
A = list(map(int, input().split()))
A = sorted(A)
ans = 1
cum = [0] * N
for i, a in enumerate(A):
    if i == 0:
        cum[i] = a
    else:
        cum[i] = cum[i - 1] + a
for i in range(N - 2, -1, -1):
    if cum[i] * 2 >= A[i + 1]:
        ans += 1
    else:
        break
print(ans)

-import numpy as np - -C = np.cumsum(A) -ans = 0 -cnt = 0 -for i in range(N - 1): -    if C[i] * 2 >= A[i + 1]: -        cnt += 1 +ans = 1 +cum = [0] * N +for i, a in enumerate(A): +    if i == 0: +        cum[i] = a -        cnt = 0 -ans = cnt + 1 +        cum[i] = cum[i - 1] + a +for i in range(N - 2, -1, -1): +    if cum[i] * 2 >= A[i + 1]: +        ans += 1 +    else: +        break