#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  long long a[t], c = 0, num = 0;
  for (int i = 0; i < t; i++) {
    cin >> a[i];
  }
  sort(a, a + t);
  for (int i = 0; i < t; i++) {
    if (num <= a[i]) {
      num += a[i];
      c++;
    }
  }
  cout << c << endl;
}
