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

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