#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, i, tmp, sum;
  vector<int> L;
  cin >> N;
  for (i = 0; i < 2 * N; i++) {
    cin >> tmp;
    L.push_back(tmp);
  }
  sort(L.begin(), L.end());
  sum = 0;
  for (i = 0; i < 2 * N; i += 2) {
    sum += L[i];
  }
  cout << sum << endl;
  return 0;
}
