#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    arr[i] = a;
  }
  sort(arr, arr + n);
  int sum = 1;
  int m = arr[0];
  for (int i = 1; i < n; i++) {
    while (arr[i] < m && i < n - 1) {
      i++;
    }
    if (m <= arr[i]) {
      sum++;
      m += arr[i];
    }
  }
  cout << sum << endl;
}
