#include<bits/stdc++.h>
using namespace std;

long long pre[100005],A[100005];

int main()
{
	int N;
	scanf("%d",&N);
	
	int i;
	
	for (i=1;i<=N;i++)
	{
		cin>>A[i];
	}
	
	sort(A+1,A+N+1);
	
	for (i=1;i<=N;i++)
	pre[i]=pre[i-1]+A[i];
	
	int p=0;
	for(i=N-1;i>0;i--)
	{
		if(pre[i]*2<A[i+1])
		{
			p=i;
			break;
		}
	}
	
	cout<<N-p;
	
}