

a = eval(input())

b = eval(input())

h = eval(input())

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

b = int(input())

h = int(input())

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

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

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