import java.util.Scanner

object Main extends App{
  val sc = new Scanner(System.in)
  val n = sc.nextInt()
  val l = new Array[Int](2*n)
  for(i <- 0 until 2*n)
    l(i) = sc.nextInt()

  val l2 = l.sorted
  var ans = 0
  for(i <- 0 until n)
    ans += l2(2*i)
  println(ans)
}
