You are given a trapezoid. The lengths of its upper base, lower base, and height are a, b, and h, respectively.    An example of a trapezoid  Find the area of this trapezoid.
print((int(input())+int(input()))/2*int(input()))
print(int((int(input())+int(input()))/2*int(input())))