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

int N;

int main()
{
    cin >> N;
    vector<int> a(N);
    vector<int> v;
    v.push_back(0);
    for (int i = 0; i < N; i++)
    {
        cin >> a[i];
    }
    sort(a.begin(), a.end());
    for (int i = 0; i < N; i++)
    {
        v.push_back(v.back() + a[i]);
    }
    int ans = 1;
    for (int i = N - 2; i >= 0; i--)
    {
        //cout << v[i] << " " << a[i] << endl;
        if (a[i + 1] <= 2 * (a[i] + v[i]))
            ans++;
        else
            break;
    }
    cout << ans << endl;
}