#include <bits/stdc++.h>
using namespace std;
int p[101];
int main() {
  long long n;
  scanf("%I64d", &n);
  int a[n], sum = 0, c = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (sum <= a[i]) {
      c++;
      sum += a[i];
    }
  }
  cout << c;
  return 0;
}
