#include <bits/stdc++.h>
using namespace std;
#define ll long long

int main(){
    int N;
    cin >> N;
    vector<int> A(N);
    for (int i = 0; i < N; i++) cin >> A[i];
    sort(A.begin(), A.end());
    ll sum = 0;
    ll ans = N;
    for (int i = 0; i < N-1; i++) {
        sum += A[i];
        if (sum*2 < A[i+1]) ans = N-1-i;
    }
    cout << ans << endl;
    return 0;
}