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

const int mnx = 1e6 + 9;
const int mod = 1e9 + 7;

ll n;
ll a[mnx];

int main() {

cin >> n;

for(int i = 1; i <= n; i++){
    cin >> a[i];
}

sort(a + 1, a + n + 1);

ll sum = 0, id;

for(int i = 1; i <= n; i++){
    sum += a[i];
    if(2 * sum < a[i + 1]) id = i;
}

cout << n - id << '\n';

return 0;

}
