a,b,h=int(eval(input())),int(eval(input())),int(eval(input()))

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

b = eval(input())

h = eval(input())

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

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

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