function Main (input) {
  input = input.split("\n");
  var N = parseInt(input[0], 10);
  var L = input[1].split(" ").map(Number).sort((a, b) => b > a);
  var ans = 0;
  for (var i = 0; i < 2*N; i+=2) {
    ans += Math.min(L[i], L[i+1]);
  }
  console.log(ans);
}

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