let id x = x

let read_ints =
  let rec aux acc = function
    | 0 -> acc
    | n -> aux ((Scanf.scanf "%d " id) :: acc) (n-1) in
  aux []

let odd_sum =
  let rec aux acc = function
    | [] -> acc
    | hd1 :: hd2 :: tl -> aux (hd1 + acc) tl in
  aux 0

let () =
  let n = Scanf.scanf "%d\n" id in
  let l = read_ints (2*n) in
  print_int (odd_sum (List.sort compare l))
