import sys



sys.setrecursionlimit(10 ** 7)

f_inf = float('inf')

mod = 10 ** 9 + 7





def resolve():

    n = int(eval(input()))

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

    ruiseki = [0] * n

    ruiseki[0] = A[0]

    for i in range(1, n):

        ruiseki[i] = ruiseki[i - 1] + A[i]



    idx = 0

    for i in range(n - 1):

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

            idx = i + 1



    print((n - idx))





if __name__ == '__main__':

    resolve()

import sys

from itertools import accumulate



sys.setrecursionlimit(10 ** 7)

f_inf = float('inf')





def resolve():

    n = int(eval(input()))

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



    R = [0] + list(accumulate(A))

    left = 0

    for i in range(n):

        if R[i] * 2 < A[i]:

            left = i

    print((n - left))





if __name__ == '__main__':

    resolve()

import sys

sys.setrecursionlimit(10**7)
f_inf = float("inf")
mod = 10**9 + 7


def resolve():
    n = int(eval(input()))
    A = sorted(list(map(int, input().split())))
    ruiseki = [0] * n
    ruiseki[0] = A[0]
    for i in range(1, n):
        ruiseki[i] = ruiseki[i - 1] + A[i]
    idx = 0
    for i in range(n - 1):
        if ruiseki[i] * 2 < A[i + 1]:
            idx = i + 1
    print((n - idx))


if __name__ == "__main__":
    resolve()

import sys
from itertools import accumulate

sys.setrecursionlimit(10**7)
f_inf = float("inf")


def resolve():
    n = int(eval(input()))
    A = sorted(list(map(int, input().split())))
    R = [0] + list(accumulate(A))
    left = 0
    for i in range(n):
        if R[i] * 2 < A[i]:
            left = i
    print((n - left))


if __name__ == "__main__":
    resolve()

+from itertools import accumulate -mod = 10**9 + 7 -    ruiseki = [0] * n -    ruiseki[0] = A[0] -    for i in range(1, n): -        ruiseki[i] = ruiseki[i - 1] + A[i] -    idx = 0 -    for i in range(n - 1): -        if ruiseki[i] * 2 < A[i + 1]: -            idx = i + 1 -    print((n - idx)) +    R = [0] + list(accumulate(A)) +    left = 0 +    for i in range(n): +        if R[i] * 2 < A[i]: +            left = i +    print((n - left))