#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long ar[n];
  for (long long i = 0; i < n; i++) cin >> ar[i];
  sort(ar, ar + n);
  long long n1 = ar[0], count = 1;
  for (int i = 1; i < n; i++) {
    while (true) {
      if (n1 <= ar[i]) {
        n1 += ar[i];
        count++;
        break;
      } else {
        break;
      }
    }
  }
  cout << count;
  return 0;
}
