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