#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
#define FOR(i,a,n) for(int (i) = (a);i < (n);i++)

int main()
{
    int n = 0, i = 0, output = 0;
    cin >> n;
    vector<int> skewer(2 * n, 0);

    for(i = 0;i < 2*n; i++)
    {
        int temp = 0;
        cin >> temp;
        skewer.push_back(temp);
    }
    sort(skewer.begin(), skewer.end());
    i = 0;
    while(i < skewer.size())
    {
        output = output + skewer[i];
        i = i + 2;
    }
    cout << output;
	return 0;
}

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <iomanip>
#include <vector>
#include <cstring>
#include <queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using uld = unsigned long long;
using graph = vector<vector<int>>;
using P = pair<int,int>;
ll MAX(ll a,ll b,ll c){return max(a,max(b,c));}
ll MIN(ll a,ll b,ll c){return min(a,min(b,c));}
const ll mod = 1e9+7;
const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};
template<class T> inline bool chmax(T &a,T& b){if(a < b){a = b; return true;} else return false;}
template<class T> inline bool chmin(T &a,T& b){if(a > b){a = b; return true;} else return false;}
int main(){
    int n;
    cin >> n;
    n *= 2;
    int num[n];
    rep(i,n){
        cin >> num[i];
    }
    sort(num,num+n);
    reverse(num,num+n);
    ll ans = 0;
    rep(i,n){
        if(i % 2 == 1) ans += num[i];
    }
    cout << ans << endl;
}