import java.util.*
fun main(args: Array<String>){
	val cin = Scanner(System.`in`)
    val n = cin.nextInt()
    var a: Array<Long> = Array(n, {i -> cin.nextLong()})

    val a_sorted = a.sorted()

    var sum: Long = 0
    var too_big = 0
    for (i in 0..n-1) {
        if (a_sorted[i] > sum*2) {
            too_big = i
        }
        sum += a_sorted[i]
    }

    println(n-too_big)
}