n=[int(eval(input())) for _ in range(3)]

print((((n[0]+n[1])*n[2])//2))
a,b,h=[int(eval(input())) for _ in range(3)];print(((a+b)*h//2))
n = [int(eval(input())) for _ in range(3)]
print((((n[0] + n[1]) * n[2]) // 2))

a, b, h = [int(eval(input())) for _ in range(3)]
print(((a + b) * h // 2))

-n = [int(eval(input())) for _ in range(3)] -print((((n[0] + n[1]) * n[2]) // 2)) +a, b, h = [int(eval(input())) for _ in range(3)] +print(((a + b) * h // 2))