#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

int main()
{
	int N;
	cin >> N;
	vector<int> A(N);
	for (int i = 0; i < N; i++)
		cin >> A[i];

	sort(A.begin(), A.end());

	long long sum = A[0];
	int t = 0;
	for (int i = 1; i < N; i++)
	{
		if (sum * 2 < A[i])
			t = i;
		sum += A[i];
	}

	cout << N - t;
}