import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;

void main(){
	int n = readln.chomp.to!int;
	long[] as = readln.chomp.split.map!(to!long).array;
	
	as.sort!("a < b")();
	
	int x = 0;
	long s = 0;
	for(int i = 0; i < n - 1; i ++){
		s += as[i];
		if(s * 2 < as[i + 1]){
			x = i + 1;
			}
		debug writeln(i, " ", s, " ", x);
		}
	
	(n - x).writeln;
	}