fun main(args: Array) { val (x,y,z) = readLine()!!.split(" ").map { it.toInt() } val diff = Math.abs(x-y) val ans = if(diff > z) { Math.min(x,y) + z } else { Math.max(x,y) + (z-diff)/2 } println(ans) }