function Main (data) {
  data = data.split("\n");
  var kusi =  data[1].split(" ");
  for(var b = 0; b < kusi.length; b++){
    kusi[b] = Number(kusi[b]);
  }
  kusi.sort(function(a,b){
    if(a < b){return -1};
    if(a > b){return 1};
    return 0;
  });
  var a = 0;
  for(var i = 0; i < kusi.length; i++) {
    a += kusi[i];
    i++;
  }
  console.log(a);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
