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.

-----Constraints-----
 - 1≦a≦100
 - 1≦b≦100
 - 1≦h≦100
 - All input values are integers.
 - h is even.

-----Input-----
The input is given from Standard Input in the following format:
a
b
h

-----Output-----
Print the area of the given trapezoid. It is guaranteed that the area is an integer.

-----Sample Input-----
3
4
2

-----Sample Output-----
7

When the lengths of the upper base, lower base, and height are 3, 4, and 2, respectively, the area of the trapezoid is (3+4)×2/2 = 7.

Difficulty: EASY

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


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


num = [int(input()) for i in range(3)]
print((num[0] + num[1]) * num[2] // 2)


l = [int(input()) for i in range(3)]
print((l[1] + l[0]) * l[2] // 2)


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


a = [int(input()) for i in range(3)]
print((a[0] + a[1]) * a[2] // 2)


print((int(input()) + int(input())) * int(input()) // 2)


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


import sys
(a, b, h) = map(int, sys.stdin.read().split())
print((a + b) * h // 2)


import sys
(a, b, h) = map(int, sys.stdin.readlines())
print((a + b) * h // 2)


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


n = [int(input()) for i in range(3)]
print((n[0] + n[1]) * n[2] // 2)


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


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


(a, b, h) = [int(input()) for _ in '111']
print((a + b) * h // 2)


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


(a, b, c) = [int(input()) for i in range(3)]
print((a + b) * c // 2)


a = [int(input()) for _ in range(3)]
print((a[0] + a[1]) * a[2] // 2)


(a, b, c, d) = eval('[' + 'int(input()),' * 3 + '0]')
print((a + b) * c // 2)


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


f = lambda : int(input())
print((f() + f()) * f() // 2)


ans = int(input())
ans += int(input())
ans *= int(input())
print(ans // 2)


import math
from datetime import date

def main():
	a = int(input())
	b = int(input())
	h = int(input())
	area = (a + b) * h // 2
	print(area)
main()


i = lambda : int(input())
print((i() + i()) * i() // 2)


(A, B, H) = [int(input()) for _ in range(3)]
print((A + B) * H // 2)


(i, p) = (int, input)
print((i(p()) + i(p())) * i(p()) // 2)


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


import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):

	def assertIO(self, input, output):
		(stdout, stdin) = (sys.stdout, sys.stdin)
		(sys.stdout, sys.stdin) = (StringIO(), StringIO(input))
		resolve()
		sys.stdout.seek(0)
		out = sys.stdout.read()[:-1]
		(sys.stdout, sys.stdin) = (stdout, stdin)
		self.assertEqual(out, output)

	def test_入力例_1(self):
		input = '3\n4\n2'
		output = '7'
		self.assertIO(input, output)

	def test_入力例_2(self):
		input = '4\n4\n4'
		output = '16'
		self.assertIO(input, output)

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

def __starting_point():
	resolve()
__starting_point()


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


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


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


A = int(input())
B = int(input())
C = int(input())
print((A + B) * C // 2)


(a, b, h) = (int(input()) for T in range(0, 3))
print(h * (a + b) // 2)


n = [int(input()) for _ in range(3)]
print((n[0] + n[1]) * n[2] // 2)


N = int(input())
K = int(input())
X = int(input())
print((N + K) * X // 2)


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


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

def __starting_point():
	solve()
__starting_point()


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


(a, b, c) = [int(input()) for i in [0] * 3]
print((a + b) * c // 2)


def inpn():
	return int(input())
print((inpn() + inpn()) * inpn() // 2)


L = list((int(input()) for _ in range(3)))
print((L[0] + L[1]) * L[2] // 2)


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


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


s = [int(input()) for i in range(3)]
print((s[0] + s[1]) * s[2] // 2)


(a, b, h) = map(int, list((input() for i in range(3))))
print((a + b) * h // 2)


(a, b, c) = map(int, open(0).read().split())
print((a + b) * c // 2)


def solve(a, b, h):
	ans = (a + b) * h // 2
	return ans

def __starting_point():
	a = int(input())
	b = int(input())
	h = int(input())
	print(solve(a, b, h))
__starting_point()


def I():
	return int(input())
print((I() + I()) * I() // 2)


x = [int(input()) for i in range(3)]
print((x[0] + x[1]) * x[2] // 2)


c = int(input())
c = c + int(input())
print(int(c * int(input()) // 2))


print(eval('(%s+%s)*%s//2' % eval('input(),' * 3)))


up = int(input())
down = int(input())
h = int(input())
print((up + down) * h // 2)