#include <bits/stdc++.h>
using namespace std;
int n, a[100001], dem = 0;
void nhap() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
}
void process() {
  dem++;
  long long t = a[1];
  for (int i = 2; i <= n; ++i) {
    if (t <= a[i]) {
      t += a[i];
      dem++;
    }
  }
  cout << dem;
}
int main() {
  nhap();
  process();
  return 0;
}
