#include<bits/stdc++.h>
using namespace std;
int main(){
    int ans=0,n,a[10001]={};
    cin>>n;
    n*=2;
    for (int i=1;i<=n;i++) cin>>a[i];
    sort(a+1,a+n+1);
    for(int i=1;i<=n;i+=2)
        ans=ans+min(a[i],a[i+1]);
    cout<<ans;
    return 0;
}