#include <bits/stdc++.h>
#define mod 1000000007
#define pb push_back
#define ll long long
using namespace std;
int main(){
	ll n,mi=0;
	cin>>n;
	vector<ll> a(n);
	for(int i=0;i<n;i++){
		cin>>a[i];
	}
	sort(a.begin(),a.end());
	ll sum = a[0];
	for(int i=1;i<n;i++){
		if(sum * 2 < a[i]) mi = i;
		sum += a[i];
	}
	cout<<n-mi<<endl;
	return 0;
}