fun main(args : Array<String>) {
    val n = readLine()!!.toInt()
    val aa = readLine()!!.split(" ").map { it.toLong() }.sorted()

    val sums = mutableListOf<Long>()
    aa.forEachIndexed { idx, a ->
        if (idx > 0) {
            sums.add(sums[idx-1] + a)
        } else {
            sums.add(a)
        }
    }

    var idx = 0
    for (i in 0 until n-1) {
        if (sums[i] * 2L < aa[i+1]) idx = i+1
    }

    println(n-idx)
}