#include <iostream>
#include <algorithm>

using namespace std;
long long a[100010],sum = 0,ans = 1;
int main(){
	int i,n;
	cin >> n;
	for(i=0;i<n;i++){
		cin >> a[i];
		sum += a[i];
	}
	sort(a,a+n);
	for(i=n-1;i>=0;i--){
		sum -= a[i];
		if(2*sum>=a[i]) ans++;
		else break;
	}
	cout << ans << endl;
}