#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,a[250],ans=0;
	cin>>n;
	for (int i=1;i<=n*2;i++)
	  cin>>a[i];
	sort(a+1,a+n*2+1);
	for (int i=1;i<=n*2;i+=2)
	  ans+=a[i];
	cout<<ans<<endl;
	return 0;
}