#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int Arr[n];
  for (int i = 0; i < n; i++) scanf("%d", &Arr[i]);
  sort(Arr, Arr + n);
  int c = 0, cnt = 0;
  for (int i = 0; i < n; i++)
    if (c <= Arr[i]) {
      c += Arr[i];
      cnt++;
    }
  cout << cnt;
}
