i=input;print((i()+i())*i()/2)
a,b,h=list(map(int,open(0)));print(((a+b)*h//2))
i = input
print((i() + i()) * i() / 2)

a, b, h = list(map(int, open(0)))
print(((a + b) * h // 2))

-i = input -print((i() + i()) * i() / 2) +a, b, h = list(map(int, open(0))) +print(((a + b) * h // 2))