N = int(eval(input()))

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

As.sort()

from itertools import accumulate

cum = list(accumulate(As))

cnt = 0

for n in range(N-1):

    if cum[n]*2>=As[n+1]:

        cnt += 1

    else:

        cnt = 0

cnt += 1

print(cnt)
import sys

def input(): return sys.stdin.readline().strip()

def mapint(): return list(map(int, input().split()))

sys.setrecursionlimit(10**9)



N = int(eval(input()))

As = [0]+list(mapint())

As.sort()

from itertools import accumulate

cAs = list(accumulate(As))

cAs.sort(reverse=True)

As.sort(reverse=True)



ans = 1

for i in range(1, N):

    if cAs[i]*2<As[i-1]:

        break

    ans += 1



print(ans)
N = int(eval(input()))
As = list(map(int, input().split()))
As.sort()
from itertools import accumulate

cum = list(accumulate(As))
cnt = 0
for n in range(N - 1):
    if cum[n] * 2 >= As[n + 1]:
        cnt += 1
    else:
        cnt = 0
cnt += 1
print(cnt)

import sys


def input():
    return sys.stdin.readline().strip()


def mapint():
    return list(map(int, input().split()))


sys.setrecursionlimit(10**9)
N = int(eval(input()))
As = [0] + list(mapint())
As.sort()
from itertools import accumulate

cAs = list(accumulate(As))
cAs.sort(reverse=True)
As.sort(reverse=True)
ans = 1
for i in range(1, N):
    if cAs[i] * 2 < As[i - 1]:
        break
    ans += 1
print(ans)

+import sys + + +def input(): +    return sys.stdin.readline().strip() + + +def mapint(): +    return list(map(int, input().split())) + + +sys.setrecursionlimit(10**9) -As = list(map(int, input().split())) +As = [0] + list(mapint()) -cum = list(accumulate(As)) -cnt = 0 -for n in range(N - 1): -    if cum[n] * 2 >= As[n + 1]: -        cnt += 1 -    else: -        cnt = 0 -cnt += 1 -print(cnt) +cAs = list(accumulate(As)) +cAs.sort(reverse=True) +As.sort(reverse=True) +ans = 1 +for i in range(1, N): +    if cAs[i] * 2 < As[i - 1]: +        break +    ans += 1 +print(ans)