#include<set>
#include<map>
#include<stack>
#include<ctime>
#include<cmath>
#include<queue>
#include<vector>
#include<cstdio>
#include<cstring>
#include<sstream>
#include<iostream>
#include<algorithm>
#define LL long long
#define INF 0x3f3f3f3f
using namespace std;      
int read(){      
    int f=1,x=0;char s=getchar();         
    while(s<'0'||s>'9'){if(s=='-')f=-1;s=getchar();}        
    while(s>='0'&&s<='9'){x=x*10+s-'0';s=getchar();}      
    return f*x; 
}
#define MAXN 100
int L[2*MAXN+5];
int main(){
	int n=read(),ans=0;
	for(int i=1;i<=2*n;i++)
		L[i]=read();
	sort(L+1,L+2*n+1);
	for(int i=1;i<=2*n;i+=2)
		ans+=L[i];
	printf("%d\n",ans);
    return 0;
}

