import std.stdio, std.string, std.conv;
import std.typecons;
import std.algorithm, std.array, std.range, std.container;
 
void main() {
	auto N = readln.split[0].to!ulong;
	ulong[] p;
	N.iota.each!(x => p ~= readln.split[0].to!ulong);
	auto sum = p.sum, max_price = p.minPos!("a > b")[0];
	(p.sum - max_price/2).writeln;
}