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