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()))

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

print(ans)
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()))
ans = (a + b) * h // 2
print(ans)

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