# include "iostream"
# include "cstdio"
# include "algorithm"
 
using namespace std;

const int maxm=1e3+10; 

int N,A[maxm];

int main(){
	register int i,Ans=0; 
	scanf("%d",&N);
	for(i=1;i<=2*N;i++) scanf("%d",&A[i]);
	sort(A+1,A+1+2*N); 
	for(i=1;i<=2*N;i++) if(i%2==1) Ans+=A[i];
	cout<<Ans;
	return 0; 
} 