#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int n;
int l[105];
int main()
{
	int num=0;
	scanf("%d",&n);
	n*=2;
	for(int i=1;i<=n;i++)
		scanf("%d",&l[i]);
	sort(l+1,l+1+n);
	for(int i=n-1;i>=1;i-=2)
	{
		num+=l[i];
	}
	printf("%d\n",num);
}