fun main(args:Array<String>) {
    val a = readLine()
    val b = readLine()
    val h = readLine()
    println((Integer.parseInt(a ?: "") + Integer.parseInt(b ?: "")) * Integer.parseInt(h ?: "") / 2)
}