#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, s = 0, ans = 0;
  cin >> n;
  vector<int> v(n);
  for (auto &it : v) cin >> it;
  sort(v.begin(), v.end());
  for (auto it : v) {
    if (it >= s) {
      s += it;
      ans++;
    }
  }
  cout << ans << endl;
}
int main() {
  solve();
  return 0;
}
