#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  int v;
  vector<int> data;
  cin >> N;
  for (int i = 0; i < N; ++i) {
    cin >> v;
    data.push_back(v);
  }
  sort(data.begin(), data.end());
  int sum = data[0];
  int sol = 1;
  for (int i = 1; i < (int)data.size(); ++i) {
    if (data[i] >= sum) {
      sol++;
      sum += data[i];
    }
  }
  cout << sol << endl;
  return 0;
}
