#include <bits/stdc++.h>

#define f first 
#define s second 
#define pb push_back               
#define mp make_pair 

using namespace std;                    

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;

const int N = (int)1e5 + 123, mod = (int)1e9 + 7;

int n, ans, a[N];
int main(){    
	cin >> n;
	n += n;
	for(int i = 0; i < n; i++)
		cin >> a[i];
 	sort(a, a + n);            

 	for(int i = 0; i < n; i+=2)
 		ans += a[i];
	
	cout << ans;
	return 0;
}
