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