fun main(args: Array){ readLine() val ss = readLine()!!.split(" ").map { it.toInt() }.toMutableList() val max = ss.max() val maxindex = ss.indexOf(max) ss.removeAt(maxindex) val n = ss.map { it/2 }.reduce { y,x -> y+x } println(max!! + n) }