object Main extends App {
	import scala.math._

	val N = scala.io.StdIn.readInt
	val L = scala.io.StdIn.readLine.split(" ").map(_.toInt).sorted

	var sum = 0

	for(i<-0 until N){
		sum = sum + min(L(2*i),L(2*i + 1))
	}

	println(sum)

}
