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