"use strict"

const main = arg => {
  arg = arg.trim().split("\n");
  const N = parseInt(arg[0]);
  const L = arg[1].split(" ").map(n=>parseInt(n)).sort((a,b)=>a-b);
  
  let answer = 0;
  
  for(let i=0; i<N*2; i+=2) {
    answer += L[i];
  }
  
  console.log(answer);
}

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