#include<bits/stdc++.h>
using namespace std;
int a[210],n,sum,i;
int main(){
	scanf("%d",&n);
	for(i=1;i<=2*n;i++)
		scanf("%d",&a[i]);
	sort(a+1,a+2*n+1);
	for(i=1;i<2*n;i+=2)
		sum+=a[i];
	printf("%d\n",sum);
	return 0;
}