a,b,h=list(map(int,[eval(input()) for i in range(3)]))

print((h*(a+b)//2))
a,b,h=list(map(int,[eval(input())for i in[0]*3]));print((h*(a+b)//2))
a, b, h = list(map(int, [eval(input()) for i in range(3)]))
print((h * (a + b) // 2))

a, b, h = list(map(int, [eval(input()) for i in [0] * 3]))
print((h * (a + b) // 2))

-a, b, h = list(map(int, [eval(input()) for i in range(3)])) +a, b, h = list(map(int, [eval(input()) for i in [0] * 3]))