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