#include <bits/stdc++.h>
using namespace std;
char A[1002][1002];
long long int i, j, k, l, x, y, z, n, m, a, b;
int main() {
  cin >> n;
  vector<long long int> v;
  for (i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  long long int sumCount = v[0];
  long long int notDisappoint = 1;
  for (i = 1; i < n; i++) {
    if (v[i] >= sumCount) {
      notDisappoint++;
      sumCount += v[i];
    }
  }
  cout << notDisappoint << endl;
  return 0;
}
