

Time Limit: 2 sec / Memory Limit: 256 MB
配点 : 点
問題文
上底の長さが 、下底の長さが 、高さが の台形があります。

台形の例
この台形の面積を求めてください。
制約
- 入力で与えられる値はすべて整数
- は偶数
入力
入力は以下の形式で標準入力から与えられる。
出力
台形の面積を整数で出力せよ。面積が整数になることは保障されている。
入力例 1Copy
3 4 2
出力例 1Copy
7
上底の長さ 、下底の長さ 、高さ の台形の面積は、 です。
入力例 2Copy
4 4 4
出力例 2Copy
16
この例で与えられるのは平行四辺形ですが、平行四辺形も台形です。
Score : points
Problem Statement
You are given a trapezoid. The lengths of its upper base, lower base, and height are , , and , respectively.

An example of a trapezoid
Find the area of this trapezoid.
Constraints
- All input values are integers.
- is even.
Input
The input is given from Standard Input in the following format:
Output
Print the area of the given trapezoid. It is guaranteed that the area is an integer.
Sample Input 1Copy
3 4 2
Sample Output 1Copy
7
When the lengths of the upper base, lower base, and height are , , and , respectively, the area of the trapezoid is .
Sample Input 2Copy
4 4 4
Sample Output 2Copy
16
In this case, a parallelogram is given, which is also a trapezoid.