let n, s, l = read_int (), ref 0, ref 0
let a_s = Array.init n @@ fun _ -> Scanf.scanf " %d" (+) 0
let _ = Array.sort (-) a_s; for i = 0 to n - 2 do s := !s + a_s.(i); if a_s.(i + 1) > 2 * !s then l := i + 1 done; Printf.printf "%d\n" @@ n - !l