import sys

from operator import itemgetter

from itertools import accumulate

def main():

    input = sys.stdin.readline

    N = int(eval(input()))

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

    A.sort()

    C = list(accumulate(A))

    dp = [0] * N

    for i in range(N-1):

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

            dp[i+1] = dp[i] + 1

    print((dp[N-1]+1))



if __name__ == '__main__':

    main()
# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)

import sys

def main(N, A):

    A.sort()

    s = 0

    dp = [0] * (N + 1)

    for i, a in enumerate(A):

        dp[i + 1] = 1

        if a <= s * 2: dp[i + 1] += dp[i]

        s += a

    print((dp[N]))



if __name__ == '__main__':

    input = sys.stdin.readline

    N = int(eval(input()))

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

    main(N, A)

import sys
from operator import itemgetter
from itertools import accumulate


def main():
    input = sys.stdin.readline
    N = int(eval(input()))
    A = list(map(int, input().split()))
    A.sort()
    C = list(accumulate(A))
    dp = [0] * N
    for i in range(N - 1):
        if C[i] * 2 >= A[i + 1]:
            dp[i + 1] = dp[i] + 1
    print((dp[N - 1] + 1))


if __name__ == "__main__":
    main()

# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys


def main(N, A):
    A.sort()
    s = 0
    dp = [0] * (N + 1)
    for i, a in enumerate(A):
        dp[i + 1] = 1
        if a <= s * 2:
            dp[i + 1] += dp[i]
        s += a
    print((dp[N]))


if __name__ == "__main__":
    input = sys.stdin.readline
    N = int(eval(input()))
    (*A,) = list(map(int, input().split()))
    main(N, A)

+# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..) -from operator import itemgetter -from itertools import accumulate -def main(): -    input = sys.stdin.readline -    N = int(eval(input())) -    A = list(map(int, input().split())) +def main(N, A): -    C = list(accumulate(A)) -    dp = [0] * N -    for i in range(N - 1): -        if C[i] * 2 >= A[i + 1]: -            dp[i + 1] = dp[i] + 1 -    print((dp[N - 1] + 1)) +    s = 0 +    dp = [0] * (N + 1) +    for i, a in enumerate(A): +        dp[i + 1] = 1 +        if a <= s * 2: +            dp[i + 1] += dp[i] +        s += a +    print((dp[N])) -    main() +    input = sys.stdin.readline +    N = int(eval(input())) +    (*A,) = list(map(int, input().split())) +    main(N, A)