#include <bits/stdc++.h>
using namespace std;
int A[1000005], IB, n, c = 1;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  sort(A, A + n);
  IB = A[0];
  for (int i = 0; i < (n - 1); i++) {
    if (IB <= A[i + 1]) {
      IB += A[i + 1];
      c++;
    }
  }
  cout << c << endl;
  return 0;
}
