N = gets.to_i
P = Array.new(N)
S = Array.new(N)
for i in 0..N-1 do
    P[i] = gets.to_i
    if i == 0 then
        S[i] = P[i]
    else
        S[i] = S[i-1] + P[i]
    end
end

M = P.max

puts S[N-1] - (M/2)
