#include<cstdio>
#include<algorithm>
int n,ans,a[310];
int main()
{
	scanf("%d",&n),n*=2;
	for(register int i=1;i<=n;++i)scanf("%d",&a[i]);
	std::sort(a+1,a+n+1);
	for(register int i=n-1;i>0;i-=2)ans+=a[i];
	printf("%d\n",ans);
}