import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;

void main(){
	auto n = read.to!int;
	auto as = readln.chomp.split.map!(to!long).array;
	
	as.sort!("a > b")();
	
	long ans;
	for(int i = 0; i < n; i ++){
		ans += as[2 * i + 1];
		}
	
	ans.writeln;
	}



string read(){
	static string[] ss;
	while(!ss.length) ss = readln.chomp.split;
	string res = ss[0];
	ss.popFront;
	return res;
	} 
