function Main(input) {
	var len = parseInt(input.split("\n")[0]);
  var list = input.split("\n")[1].split(" ").map((list)=>Number(list));
   var output = 0;
  list.sort(function(a,b){
  	return b - a;
  });
  
  var count = 0;
  while(count < len){
    output += parseInt(list[(count * 2) + 1]);
    count++
  }
  console.log(output);
}

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