a=int(eval(input()))

b=int(eval(input()))

h=int(eval(input()))



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



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

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

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