#include<bits/stdc++.h>
using namespace std;
int n,mmm,a[100000];
int main(){
    scanf("%d",&n);
    for (int i=1;i<=2*n;i++){
        scanf("%d",&a[i]);
    }
    sort(a+1,a+1+2*n);
    for (int i=1;i<=2*n;i+=2){
        mmm+=min(a[i],a[i+1]);
    }
    cout<<mmm;
}