#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  ;
  int t;
  cin >> t;
  long long arr[t], ar[t];
  for (int i = 0; i < t; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + t);
  int cnt = 1;
  long long tmp;
  ar[0] = arr[0];
  int j = 1;
  for (int i = 1; i < t; i++) {
    if (arr[i] >= ar[j - 1]) {
      tmp = ar[j - 1] + arr[i];
      cnt++;
      ar[j] = tmp;
      j++;
    }
  }
  cout << cnt << endl;
}
