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

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

    return 0;
}
