#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int arr[n], i, ans = 1, sum = 0;
  for (i = 0; i < n; i++) scanf("%d", &arr[i]);
  std::vector<int> myvec(arr, arr + n);
  std::sort(myvec.begin(), myvec.end());
  i = 0;
  for (std::vector<int>::iterator it = myvec.begin(); it != myvec.end(); it++) {
    arr[i] = *it;
    i++;
  }
  sum = arr[0];
  for (i = 1; i < n; i++) {
    if (sum <= arr[i]) {
      ans++;
      sum = sum + arr[i];
    }
  }
  printf("%d", ans);
  return 0;
}
