s=require("fs").readFileSync("/dev/stdin","utf8").split('\n')
a = [...Array(s[0] | 0)].map((_, i) => s[i + 1] | 0)
m = Math.max(...a)
console.log(a.map((n, i) => m == n ? m /= 2 : n).reduce((c, n) => c + n))
