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