import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

int calc(int[] a) {
    a.sort();

    int index = -1;
    int sum = 0;
    for (int i = 0; i < a.length; i++) {
        if (2 * sum < a[i]) {
            index = i;
        }
        sum += a[i];
    }
    return cast(int) a.length - (index + 1) + 1;
}

void main() {
    readint;
    auto a = readints;
    writeln(calc(a));
}
