#include <algorithm>//min/max/sort(rand-access it)/merge
#include <array>
#include <bitset>
// #include <chrono>//std::chrono::/system_clock/steady_clock/high_resolution_clock/duration
#include <climits>//INT_MAX/INT_MIN/ULLONG_MAX
#include <cmath>//fmin/fmax/fabs/sin(h)/cos(h)/tan(h)/exp/log/pow/sqrt/cbrt/ceil/floor/round/trunc
// #include <cstdio>//printf/scanf/fopen/fclose/fprintf/fscanf/snprintf/putc/puts/getc/gets
#include <cstdlib>//abs/atof/atoi/atol/atoll/strtod/strtof/..., srand/rand, calloc/malloc, exit, qsort
// #include <fstream>//ifstream/ofstream
#include <iomanip>//setfill/setw/setprecision/fixed/scientific
#include <iostream>//cin/cout/wcin/wcout/left/right/internal/dec/hex/oct/fixed/scientific
#include <iterator>
#include <limits>//numeric_limits<type>::max/min/lowest/epsilon/infinity/quiet_NaN/signaling_NaN
#include <list>
#include <new>
#include <queue>
#include <string>//stoi/stol/stoul/stoll/stoull/stof/stod/stold/to_string/getline
#include <tuple>
#include <utility>//pair
#include <valarray>
#include <vector>

#define PRIME7_SHORT 10007
#define PRIME9_SHORT 10009
#define PRIME7 1000000007

using namespace std;

typedef unsigned int ui;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, int> plli;
typedef pair<ull, int> puli;
typedef pair<double, int> pdi;
typedef pair<ll, ll> pllll;
typedef pair<ull, ull> pulul;
typedef pair<double, double> pdd;
typedef tuple<int, int, int> ti3;
typedef tuple<int, int, int, int> ti4;

const bool debug = false;

template<typename T> void rar(size_t n, T* a);
template<typename T> void rar2(size_t n, size_t m, T** a);

template<typename T> T ipow(T base, T exp);

size_t left(size_t current, bool swap = false);
size_t right(size_t current, bool swap = false);

template<typename T> T griddist(T x, T y, T s, T t);
template<typename T> T griddist(pair<T, T> one, pair<T, T> two);
template<typename T> T griddist(tuple<T, T> one, tuple<T, T> two);

template<typename T> T sqeucldist(T x, T y, T s, T t);
template<typename T> T sqeucldist(pair<T, T> one, pair<T, T> two);
template<typename T> T sqeucldist(tuple<T, T> one, tuple<T, T> two);

ull modadd(ull a, ull b, int mod);
ull modmult(ull a, ull b, int mod);

int main(void)
{
    size_t n;
    cin >> n;
    vector<ull> a;
    for (size_t i = 0; i < n; ++i) {
        int temp;
        cin >> temp;
        a.push_back(temp);
    }

    sort(a.begin(), a.end());

    ull streak = 0UL;
    ull sum = 0UL;
    for (size_t i = 0; i < n; ++i) {
        sum += a[i];
        ull next = a[i+1];
        // cout << i << ' ' << sum << ' '  << next << ' ' << streak << ' ' << endl;
        if (next <= 2*sum) {
            ++streak;
        } else {
            streak = 0UL;
        }
    }

    cout << streak << endl;
    return 0;
}

template<typename T>
void rar(size_t n, T* a) {
    for (size_t i = 0; i < n; ++i) cin >> a[i];
    return;
}

template<typename T>
void rar2(size_t n, size_t m, T** a) {
    for (size_t i = 0; i < n; ++i) {
        a[i] = new int[m];
        for (size_t j = 0; j < m; ++j) cin >> a[i][j];
    } return;
}

template<typename T>
T ipow(T base, T exp) {
    T result = 1;
    // Maybe add inverse functionality
    // if (exp < 0) {
    //     exp = -exp;
    //     // Doesn't really work since T integral
    //     base = 1./base;
    // }
    while (exp) {
        if (exp & 1) result *= base;
        exp >>= 1;
        base *= base;
    }
    return result;
}

size_t left(size_t current, bool swap) {
    return swap ? right(current, false) : 2*current+1;
}
size_t right(size_t current, bool swap) {
    return swap ? left(current, false) : 2*(current+1);
}

template<typename T>
T griddist(T x, T y, T s, T t) {
    return abs(x-s) + abs(y-t);
}
template<typename T>
T griddist(pair<T, T> one, pair<T, T> two) {
    return abs(one.first - two.first) + abs(one.second - two.second);
}
template<typename T>
T griddist(tuple<T, T> one, tuple<T, T> two) {
    return abs(get<0>(one) - get<0>(two)) + abs(get<1>(one) - get<1>(two));
}

template<typename T>
T sqeucldist(T x, T y, T s, T t) {
    T a = x-s;
    T b = y-t;
    return a*a+b*b;
}
template<typename T>
T sqeucldist(pair<T, T> one, pair<T, T> two) {
    T a = one.first - two.first;
    T b = one.second - two.second;
    return a*a+b*b;
}
template<typename T>
T sqeucldist(tuple<T, T> one, tuple<T, T> two) {
    T a = get<0>(one) - get<0>(two);
    T b = get<1>(one) - get<1>(two);
    return a*a+b*b;
}

ull modadd(ull a, ull b, int mod) {
    return ((a%mod) + (b%mod))%mod;
}
ull modmult(ull a, ull b, int mod) {
    return ((a%mod)*(b%mod))%mod;
}


Measured memory_bytes: 1400