#include <iostream>
#include <algorithm>

using namespace std;

const int MAX_N = 205;

int arr [MAX_N];

int main () {
  int n;
  cin >> n;

  n *= 2;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }

  sort(arr, arr + n);

  int ans = 0;
  for (int i = 0; i < n; i += 2) {
    ans += arr[i];
  }

  cout << ans << endl;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a[2*n];
	for(int i=0;i<2*n;i++)
	cin>>a[i];
	sort(a,a+2*n);
	int sum=0;
	for(int i=0;i<2*n-1;i+=2)
	sum+=min(a[i],a[i+1]);
	cout<<sum;
	
}