let split_string ?(pattern=" ") = Str.split @@ Str.regexp pattern

let n = Scanf.sscanf (read_line ()) "%d" @@ fun n -> n
let a = Array.of_list @@ List.map int_of_string @@ split_string @@ read_line ()

let () =
  Array.sort (fun a b -> a - b) a;
  let sum = ref a.(0) in
  let t = ref 0 in
  for i = 1 to n - 1 do
    if !sum * 2 < a.(i) then t := i;
    sum := !sum + a.(i)
  done;
  Printf.printf "%d\n" @@ n - !t
