#include <bits/stdc++.h>
using namespace std;
int n, a[100009];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int ans = 0;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    if (sum <= a[i]) {
      ans++;
      sum += a[i];
    } else
      continue;
  }
  cout << ans << endl;
}
