import scala.io.StdIn._;

object Main{
    def main(args:Array[String]){
        readLine();
        val _a = readLine().split(" ");
        var a = Array.ofDim[Int](_a.length);
        for(i <- 0 until a.length){
            a(i) = _a(i).toInt;
        }
        a = a.sorted;
        var s = 0;
        for(i <- 0 until a.length){
            if(i % 2 == 0){
                s += a(i).toInt;
            }
        }
        printf("%d\n",s);
    }
}