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