#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	int n; cin >> n;
	int ans = 0;
	long long a[114514];
	for (int i = 0; i < n; i++){
		cin >> a[i];
	}
	sort(a, a + n);
	long long sum = 0;
	for (int i = 0; i < n; i++){
		if (sum * 2 < a[i])ans = 1;
		else ans++;
		sum += a[i];
	}
	cout << ans << endl;
}