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