let solve n a =
	let rec loop checked lost sum lst =
		match lst with
		| [] -> lost
		| x :: xs ->
			if x <= sum * 2 then
				loop (checked + 1) lost (sum + x) xs
			else
				loop (checked + 1) checked (sum + x) xs
	in
	n - loop 0 0 0 (List.sort compare a)

let () =
	let n = read_int () in
	let a =
		read_line ()
		|> Str.split (Str.regexp " ")
		|> List.map int_of_string
	in
	solve n a
	|> print_int
	|> print_newline
