function Main(input) {
	input = input.split("\n")[1].split(" ");
  input.sort(function(a,b){
  	return parseInt(a) - parseInt(b);
  });
  //console.log(input);
  var output = 0;
  for(var i = 0; i < input.length; i = i + 2){
  	output += parseInt(input[i]);
  }
  console.log(output)
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
