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

int a[210] = { 0 }, n;

int main() {
	cin >> n;
	int len = 2 * n, ans = 0;
	for (int i = 0; i < len; i++) cin >> a[i];
	sort(a, a + len);
	for (int i = 0; i < len; i += 2) ans += a[i];
	cout << ans << endl;
	return 0;
}
#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int main()
{
  int n;
  cin>>n;
  vector<int>v;
  int answer=0;
  for(int i = 0 ; i< 2*n ;i++){
    int k;
    cin>>k;
    v.push_back(k);
  }
  sort(v.begin(),v.end());
  for(int i = 0 ; i < 2*n ; i+=2){
    answer+=min(v.at(i),v.at(i+1));
  }
  cout<<answer<<endl;
return 0;
}
