open System

[<EntryPoint>]
let main argv = 
  let n = Console.ReadLine() |> int
  
  let rec f = 
    function 
    | [] | [ _ ] -> []
    | (x :: y :: z) -> x :: f z
  
  let l = 
    Console.ReadLine().Split()
    |> Array.map int
    |> Array.sort
    |> Array.toList
  
  f l
  |> List.sum
  |> Console.WriteLine
  0
