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