#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int n;int a[5000];
int main ()
{
	
	while(~scanf("%d",&n))
	{
		
		for(int i=0;i<2*n;i++)
			cin>>a[i];
		sort(a,a+2*n);
		int sum=0;
		for(int i=0;i<2*n;i+2)
			sum+=a[i];
		cout<<sum<<endl;		
		
	}
}