#include <bits/stdc++.h>
using namespace std;
const int maxN = 100 + 10;
int a[2 * maxN];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < 2 * n; i++) cin >> a[i];
  sort(a, a + 2 * n);
  int ans = 0;
  for (int i = 0; i < 2 * n; i += 2) ans += a[i];
  cout << ans << endl;
}
