import
    std.stdio,
    std.algorithm,
    std.conv,
    std.string,
    std.array;

void main(){
    readln;
    int[] arr = readln.split.map!(to!int).array.sort;
    int ans = 0;
    for(auto i = 0; i<arr.length; i+=2){
        ans += arr[i];
    }
    ans.writeln;
}