#include<bits/stdc++.h>
using namespace std;
using ll = int64_t;
int main(){
	ll n; 
	cin >> n;
	ll a[n];
	for(ll i = 0; i < n; i++) cin >> a[i];
	sort(a, a + n);
	ll po = a[0];
	ll yo = 0;
	for(ll i = 1; i < n; i++){
		if(po * 2 < a[i]) yo = i;
		po += a[i];
	}
	cout << n - yo << endl;
	return 0;
}