#include<iostream>
#include<algorithm>
using namespace std;
int a[105];
int main(){
	int n,ans;
	cin>>n;
	for (int i=1;i<=n*2;i++)cin>>a[i];
	sort(a+1,a+n*2+1);
	ans=0;
	for (int i=1;i<=n*2-1;i+=2) ans+=a[i];
	cout<<ans<<endl;
	return 0;
}