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

int main() {
  int N;
  cin >> N;
  N *= 2;
  int L[N];
  for (int i = 0; i < N; i++) cin >> L[i];
  
  int count = 0;
  
  priority_queue<int> Que;
  for (int i = 0; i < N; i++){
    Que.push(L[i]);
  }
  
  while(!Que.empty()){
    Que.pop();
    if (Que.empty()) break;
    count += Que.top();
    Que.pop();
  }
  
  cout << count << endl;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)


int main(){
  int n;
  cin >> n;
  vector<int> l(2*n);
  int sum =0;
  rep(i,2*n){
    cin >> l[i];
  }
  rep(i,2*n){
    rep(j,2*n-i-1){
      int temp;
      if(l[j]>l[j+1]){
        temp =l[j];
        l[j] = l[j+1];
        l[j+1]=temp;
      }
    }
  }
  rep(i,n){
    sum +=l[2*i];
  }
  cout << sum << endl;
  return 0;
}
