a = int(eval(input()))

b = int(eval(input()))

h = int(eval(input()))



answer = (a + b) * h // 2



print(answer)
a = int(eval(input()))

b = int(eval(input()))

h = int(eval(input()))



print(((a + b) * h // 2))
a = int(eval(input()))
b = int(eval(input()))
h = int(eval(input()))
answer = (a + b) * h // 2
print(answer)

a = int(eval(input()))
b = int(eval(input()))
h = int(eval(input()))
print(((a + b) * h // 2))

-answer = (a + b) * h // 2 -print(answer) +print(((a + b) * h // 2))