let rec get_odd lst =
	match lst with
	| []
	| _ :: [] -> []
	| _ :: x :: xs ->
		x :: get_odd xs

let rec head n lst =
	match lst with
	| [] -> []
	| x :: xs ->
		if n > 0 then x :: head (n - 1) xs
		else []

let () =
	let n = read_int () in
	let a =
		read_line ()
		|> Str.split (Str.regexp " ")
		|> List.map int_of_string
	in
	List.sort (fun a b -> compare b a) a
	|> get_odd
	|> head n
	|> List.fold_left (+) 0
	|> print_int
	|> print_newline
