n=int(eval(input()))

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

wa=0

a.sort()

count=0

for i in range(n-1):

  if 2*(wa+a[i])>=a[i+1]:

    count+=1

  else:

    count=0

  wa+=a[i]

print((count+1))
n=int(eval(input()))

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

a.sort(reverse=True)

ssum=sum(a)

ans=1

for i in range(n):

  ssum-=a[i]

  if 2*ssum<a[i]:

    break

  else:

    ans+=1

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

n = int(eval(input()))
a = list(map(int, input().split()))
a.sort(reverse=True)
ssum = sum(a)
ans = 1
for i in range(n):
    ssum -= a[i]
    if 2 * ssum < a[i]:
        break
    else:
        ans += 1
print(ans)

-wa = 0 -a.sort() -count = 0 -for i in range(n - 1): -    if 2 * (wa + a[i]) >= a[i + 1]: -        count += 1 +a.sort(reverse=True) +ssum = sum(a) +ans = 1 +for i in range(n): +    ssum -= a[i] +    if 2 * ssum < a[i]: +        break -        count = 0 -    wa += a[i] -print((count + 1)) +        ans += 1 +print(ans)