#include <bits/stdc++.h>
using namespace std;

int n,a[210],ans;
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=2*n;++i)
	scanf("%d",&a[i]);
	n*=2;
	sort(a+1,a+n+1);
	for(int i=n-1;i>=1;i-=2)
	ans+=a[i];
	printf("%d\n",ans);
	return 0;
}