#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x, i, cnt = 1, n, sum = 0, v[100001];
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v, v + n);
  sum = v[0];
  for (i = 1; i < n; i++) {
    if (sum <= v[i]) {
      cnt++;
      sum += v[i];
    }
  }
  cout << cnt << endl;
}
