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