#define NDEBUG

#define GV_JS

#undef __STRICT_ANSI__

#include <string>
#include <cstdlib>
#include <cstdio>
#include <tuple>
#include <vector>
#include <map>
#include <utility>
#include <algorithm>
#include <functional>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <cassert>

using namespace std;

#undef assert
#define assert(e)

#include <cstdarg>

const char * format(const char * fmt, ...) {
	static char buf[65536];
	va_list arg;
	va_start(arg, fmt);
	vsprintf(buf, fmt, arg);
	va_end(arg);
	return buf;
}

void info(const char * format, ...) {
	va_list arg;
	va_start(arg, format);
	vfprintf(stderr, format, arg);
	va_end(arg);
}

typedef unsigned int uint;
typedef unsigned int uint32;

#define arraysizeof(ARRAY) ((int)(sizeof(ARRAY) / sizeof(*(ARRAY))))

void gvUsing(function<void()> func) {
	func();
}

#include <sys/time.h>

class XsRandom {
	unsigned long long a;
	unsigned long long b;
public:
	inline XsRandom() : a(0x8a5cd789635d2dffULL), b(0x121fd2155c472f96ULL) {
	}
	inline XsRandom(const XsRandom & o) : a(o.a), b(o.b) {
	}
	inline unsigned long long next64() {
		unsigned long long c = a ^ (a<<23);
		a = b;
		b = c ^ a ^ (c>>18) ^ (a>>5);
		return b + a;
	}
	inline XsRandom(unsigned int seed) : a(0x8a5cd789635d2dffULL), b(0x121fd2155c472f96ULL) {
		seed = seed * 1234567891 + 521288629;
		unsigned long long a2 = a;
		unsigned long long b2 = b;
		while(seed) {
			next64();
			if(seed & 1) {
				a2 ^= a;
				b2 ^= b;
			}
			seed >>= 1;
		}
		a = a2;
		b = b2;
	}
	inline unsigned int next() {
		return (unsigned int)next64();
	}
	inline int nextInt(int r) {
		assert(1<=r);
		return ((unsigned long long)next() * r)>>32;
	}
};

class PcgRandom {
	unsigned long long state;
public:
	inline PcgRandom() : state(0x8a5cd789635d2dffULL) {
	}
	inline PcgRandom(const PcgRandom & o) : state(o.state) {
	}
	inline unsigned int next() {
		unsigned long long old = state;
		state = old * 6364136223846793005ULL + 1442695040888963407ULL;
		unsigned int ret = ((old>>18)^old) >> 27;
		unsigned int rot = (old>>59);
		return (ret>>rot) | (ret<<-rot);
	}
	inline PcgRandom(unsigned int seed) : state(0x8a5cd789635d2dffULL) {
		seed = seed * 1234567891 + 521288629;
		unsigned long long st = state;
		while(seed) {
			next();
			if(seed & 1) {
				st ^= state;
			}
			seed >>= 1;
		}
		state = st;
	}
	inline int nextInt(int r) {
		assert(1<=r);
		return ((unsigned long long)next() * r)>>32;
	}
};

class MTRandom {
	unsigned int state[624];
	int counter;
public:
	inline MTRandom(const MTRandom & o) {
		memcpy(this, &o, sizeof(MTRandom));
	}
	inline unsigned int next() {
		if(arraysizeof(state)<=counter) {
			unsigned int vv[] = { 0, 0x9908B0DF };
			int i;
			for(i=0; i<arraysizeof(state)-397; ++i) {
				unsigned int v = (state[i]&0x80000000) | (state[i+1]&0x7FFFFFFF);
				state[i] = state[i+397] ^ (v>>1) ^ vv[v&1];
			}
			for(; i<arraysizeof(state)-1; ++i) {
				unsigned int v = (state[i]&0x80000000) | (state[i+1]&0x7FFFFFFF);
				state[i] = state[i+397-arraysizeof(state)] ^ (v>>1) ^ vv[v&1];
			}
			{
				unsigned int v = (state[arraysizeof(state)-1]&0x80000000) | (state[0]&0x7FFFFFFF);
				state[arraysizeof(state)-1] = state[397] ^ (v>>1) ^ vv[v&1];
			}
			counter = 0;
		}
		unsigned int ret = state[counter];
		++counter;
		ret ^= ret>>11;
		ret ^= (ret<<7) & 0x9D2C5680;
		ret ^= (ret<<15) & 0xEFC60000;
		ret ^= ret>>18;
		return ret;
	}
	inline MTRandom(unsigned int seed = 4357) {
		for(int i=0; i<arraysizeof(state); ++i) {
			unsigned int v = seed & 0xFFFF0000;
			seed = 69069 * seed + 1;
			state[i] = v | ((seed>>16) & 0x0000FFFF);
			seed = 69069 * seed + 1;
		}
		counter = arraysizeof(state);
	}
	inline int nextInt(int r) {
		assert(1<=r);
		return ((unsigned long long)next() * r)>>32;
	}
};

#if defined(USE_RANDOM_MT)
typedef MTRandom MyRandom;
#elif defined(USE_RANDOM_PCG)
typedef PcgRandom MyRandom;
#elif defined(USE_RANDOM_XS)
typedef XsRandom MyRandom;
#else
typedef XsRandom MyRandom;
#endif

MyRandom g_myRand;

static inline double getTime2(){
	timeval tv;
	gettimeofday(&tv, 0);
	double result = tv.tv_sec + tv.tv_usec * 1e-6;
	return result;
}
static double g_startTime;
static double g_suspendTime = 0;
const double g_timeupSecBase = 9.8;
double g_timeupSec = g_timeupSecBase;

double watch(const char * format, function<void()> func, ...) {
	double start = getTime2();
	func();
	double spend = getTime2() - start;
	{
		va_list arg;
		va_start(arg, func);
		char buf[4096];
		int ret = vsnprintf(buf, sizeof(buf), format, arg);
		va_end(arg);
		if((int)sizeof(buf)<=ret) {
			buf[sizeof(buf)-1] = '\0';
		}
		info("%s: %fsec\n", buf, spend);
	}

	return spend;
}

double watch(function<void()> func) {
	return watch("time", func);
}

#include <numeric>

template<bool bigIsBetter>double searchConvex(function<double(double)> func, double a, double d, int n=20) {
	double b = (d-a)*0.381966+a;
	double c = (a-d)*0.381966+d;
	double bV = func(b);
	double cV = func(c);
	for(int i=0; i<n; ++i) {
		if(bigIsBetter ? cV<bV : bV<cV) {
			d = c;
			c = b;
			b = (d-a)*0.381966+a;
			cV = bV;
			bV = func(b);
		}
		else {
			a = b;
			b = c;
			c = (a-d)*0.381966+d;
			bV = cV;
			cV = func(c);
		}
	}
	if(bigIsBetter ? cV<bV : bV<cV) {
		return b;
	}
	else {
		return c;
	}
}

const char * nextCLineOrWord(int mode) {
	static char buf[65536];
	static int bufLen = sizeof(buf);
	static int bufPos = sizeof(buf);
	static bool canReadFlag = true;
	static bool crFlag = false;
	static bool enterFlag = false;
	if(canReadFlag && (enterFlag ? bufLen<=bufPos : (int)sizeof(buf)<=bufPos+bufPos)) {
		if(0<bufLen-bufPos) {
			memmove(buf, buf+bufPos, bufLen-bufPos);
			bufLen -= bufPos;
		}
		else {
			bufLen = 0;
		}
		char * result = fgets(buf+bufLen, sizeof(buf)-bufLen, stdin);
		canReadFlag = (result!=NULL);
		if(result!=NULL) {
			int n = strlen(result);
			enterFlag = (n!=(int)sizeof(buf)-1-bufLen || (1<=bufLen+n && buf[bufLen+n-1]=='\n'));
			bufLen += n;
		}
		bufPos = 0;
	}
	if(mode==0) {
		int pos = bufPos;
		while(true) {
			char c = buf[pos];
			if(c==32) {
				buf[pos++] = '\0';
				break;
			}
			else if(c==10) {
				if(crFlag) {
					crFlag = false;
					if(bufPos==pos) {
						pos = ++bufPos;
						continue;
					}
				}
				buf[pos++] = '\0';
				break;
			}
			else if(c==13) {
				crFlag = true;
				buf[pos++] = '\0';
				break;
			}
			else if(c==0) {
				break;
			}
			++pos;
		}
		const char * ret = buf + bufPos;
		bufPos = pos;
		return ret;
	}
	else if(mode==1) {
		int pos = bufPos;
		while(true) {
			char c = buf[pos];
			if(c==10) {
				if(crFlag) {
					crFlag = false;
					if(bufPos==pos) {
						pos = ++bufPos;
						continue;
					}
				}
				buf[pos++] = '\0';
				break;
			}
			else if(c==13) {
				crFlag = true;
				buf[pos++] = '\0';
				break;
			}
			else if(c==0) {
				break;
			}
			++pos;
		}
		const char * ret = buf + bufPos;
		bufPos = pos;
		return ret;
	}
	else if(mode==2) {
		return bufLen<=bufPos ? NULL : buf+bufPos;
	}
	assert(false);
	return NULL;
}

const char * nextCWord() {
	return nextCLineOrWord(0);
}

int nextInt() {
	return atoi(nextCWord());
}

vector<int> nextIntVec(int n) {
	vector<int> ret;
	for(int i=0; i<n; ++i) {
		ret.push_back(nextInt());
	}
	return ret;
}

void echoln() {
	fputc('\n', stdout);
}
void echoln(const char * format, ...) {
	va_list arg;
	va_start(arg, format);
	vprintf(format, arg);
	va_end(arg);
	fputc('\n', stdout);
}

int main() {
	int N = nextInt();
	auto L = nextIntVec(2*N);
	sort(L.begin(), L.end());
	int ret = 0;
	for(int i=0; i<N; ++i) {
		ret += L[i*2];
	}
	echoln("%d", ret);

	return 0;
}


Measured memory_bytes: 256