import java.util.*

fun main(args: Array<String>){

    var N = readLine()!!.toInt()
    var A = readLine()!!.split(" ").map{it.toLong()}.toLongArray()
    Arrays.sort(A)
    var size = A[0]
    var candidate = 0
    for(i in 0 until N-1){
        if(size * 2 < A[i+1]){
            candidate = i+1
        }
        size += A[i+1]

    }
    println(N - candidate)





}