#include<cstdio>
#include<algorithm>
#include<iostream>

using namespace std;
int L[205];
int main()
{
	int N;
	int sum=0;
	int min;
	while(~scanf("%d",&N))
	{
		for(int i=0;i<2*N;i++)
		{
			cin>>L[i];
		}
		sort(L,L+2*N);
		
		for(int j=0;j<2*N;j=j+2)
		{
			min=L[j]<L[j+1] ? L[j] : L[j+1];
			sum=sum+min;
		}
		cout<<sum<<endl;
	}
} 