fun main(args: Array<String>) {
    val numA = readLine()?.orEmpty()?.toInt()
    val numB = readLine()?.orEmpty()?.toInt()
    val numH = readLine()?.orEmpty()?.toInt()

    println((numA!! + numB!!) * numH!! / 2)
}