#include<bits/stdc++.h>
  using namespace std;
#define rep(i,j,k) for (int i=j;i<=k;i++)
int sum,a[210]={0},n;
inline void into(){
  scanf("%d",&n);
  n=n<<1;
  rep(i,1,n)
    scanf("%d",&a[i]);
}
inline void work(){
  sort(a+1,a+1+n);
  rep(i,1,n)
    if (i&1) sum+=a[i];
}
inline void outo(){
  printf("%d\n",sum);
}
int main(){
  into();
  work();
  outo();
  return 0;
}