let n, ans = read_int (), ref 0
let ss, a_s = Array.(make n 0, init n @@ fun _ -> Scanf.scanf " %d" (+) 0)
let _ = Array.(sort (-) a_s; ss.(0) <- a_s.(0); iteri (fun i a -> if i > 0 then ss.(i) <- ss.(i - 1) + a) a_s;
  iteri (fun i a -> if i = n - 1 || a_s.(i + 1) <= 2 * ss.(i) then incr ans else ans := 0) a_s); Printf.printf "%d\n" !ans