a = int(eval(input()))

b = int(eval(input()))

h = int(eval(input()))



s = int((a + b) * h / 2)



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

b = int(eval(input()))

h = int(eval(input()))

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

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

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