#include <iostream>
using namespace std;
int main(void){
  int n,i,j,ans=0;
  cin >>n;
  int l[200];
  int max,tmp;
  while(cin>>j){
    l[i] = j;
    i++;
  }
  cout<<endl;
  for(i=0;i<2*n-1;++i){
    max=i;
    for(j=i+1;j<2*n;++j){
      if(l[max]<l[j]){
        max=j; 
      }
    }
    tmp=l[max];
    l[max]=l[i];
    l[i]=tmp;
  }
  
  for(i=1;i<2*n;i=i+2){
    ans+=l[i];
  }
  cout<<ans;
}

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int getResult(vector<int> &L, const int size){
  sort(L.begin(), L.end());
  int sum = 0;
  for(int i = 0; i < size; i += 2){
    sum += L[i];
  }
  return sum;
}

int main(){
  int N;
  cin >> N;
  
  const int N2 = N * 2;
  vector<int> L(N2);
  for(int i = 0; i < N2; i++){
    cin >> L[i];
  }

  int result = getResult(L, N2);
  cout << result;
  return 0;
}