let lines = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n');

let N = +lines[0];
let Ls = lines[1].split(' ').map(Number);

Ls = Ls.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);

let total = 0;
for (let i = 0; i < Ls.length; i += 2) {
    total += Ls[i];
}
console.log(total);
