import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

import scala.annotation.tailrec

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val n = in.readLine().toInt
    val as = in.readLine().split("\\s+").map(_.toInt).sorted

    @tailrec
    def solve(acc: Long, i: Int, as: List[Int]): Int = {
      as match {
        case ai :: aip1 :: rest =>
          val new_acc = acc + 2L * ai
          if (new_acc < aip1) {
            i
          } else {
            solve(new_acc, i + 1, aip1 :: rest)
          }
        case _ =>
          -1
      }
    }

    out.println(n - solve(0L, 0, as.toList) - 1)
    out.flush()
  }
}
