#include <bits/stdc++.h>

using namespace std;

int main() {
  int n;
  scanf("%d", &n);
  vector<int> a(2 * n);
  for (int i = 0; i < 2 * n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a.begin(), a.end());
  int ans = 0;
  for (int i = 0; i < 2 * n; i += 2) {
    ans += a[i];
  }
  printf("%d\n", ans);
  return 0;
}