object Main {
  def main(args: Array[String]): Unit = {
    val n = io.StdIn.readInt
    val kusi = io.StdIn.readLine().split(' ').map(_.toInt)
    val sortKusi = kusi.sorted
    var res = 0
    for (i <- 0 until n) res += sortKusi(i*2)
    println(res)
  }
}