#include <iostream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <stack>
#include <list>
#include <queue>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <set>
#include <map>
#include <sstream>
#include <deque>
using namespace  std;
#define  ll long long
#define  ull unsigned long long
#define mINF(a) memset(a,0x3f3f3f3f,sizeof(a))
#define m0(a) memset(a,0,sizeof(a))
#define mf1(a) memset(a,-1,sizeof(a))
#define lowbit(x) (x&(-x)) 
#define lson i<<1,l,l+r>>1
#define rson i<<1|1,((l+r)>>1)+1,r
#define ALL(x) x.begin(),x.end()
typedef pair<ll,ll>P;
static const ll INF=1e18;
static const ll len=1e5+2;
int main()
{
	ll n;
	while(cin>>n)
	{
		ll ans[len];
		for(ll i=0;i<n;++i)
			scanf("%lld",ans+i);
		sort(ans,ans+n);
		ll sum=ans[0],c=1;
		for(ll i=1;i<n;++i)
		{
			if(sum*2>=ans[i])
			{
				c++;
				sum+=ans[i];
			}
			else
			{
				c=1;
				sum+=ans[i];
			}
		}
		cout<<c<<endl;
	}
    return 0;
}