#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5;
int l[N];
int main(int, char **) {
  int n;
  scanf("%d", &n);
  n *= 2;
  for (int i = 0; i < n; i++) scanf("%d", &l[i]);
  sort(l, l + n);
  reverse(l, l + n);
  int ans = 0;
  for (int i = 0; i < n; i += 2) {
    ans += l[i + 1];
  }
  printf("%d\n", ans);
  return 0;
}
