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

int main() {
  int n;
  cin >> n;

  vector<long long> a(n);
  for (auto& u : a) cin >> u;

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

  long long sum = 0;
  int ans = 0;
  for (int i = 0; i < n - 1; ++i) {
    sum += a[i];
    if (2 * sum >= a[i + 1]) ans++;
    else ans = 0;
  }
  ans++;

  cout << ans << endl;
}
