import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons;

void main() {
    const N = readln.chomp.to!int;
    auto tmp = N.iota.map!(_ => readln.chomp.to!int).array.sort!"a<b".array;
    writeln(tmp[0..$-1].sum + tmp[$-1]/2);
}

