Problem:
Score : 100 points

Problem Statement

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 1

3
4
2

Sample Output 1

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.

Sample Input 2

4
4
4

Sample Output 2

16

In this case, a parallelogram is given, which is also a trapezoid.

Solution in Java8 (OpenJDK 1.8.0) (judge verdict: Wrong Answer)

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aeroui
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            char[] a1 = in.next().toCharArray();
            char[] a2 = in.next().toCharArray();
            char[] a3 = in.next().toCharArray();

            int len = Math.min(a1.length, Math.min(a2.length, a3.length));
            char ans = '#';
            for (int i = 0; i < len; i++) {
                if (a1[i] == a2[i] && a2[i] == a3[i]) {
                    out.println((char) ('A' + a1[i] - 'a'));
                    return;
                } else if ((a1[i] == a2[i] || a1[i] == a3[i]) && ans == '#') {
                    ans = (char) ('A' + a1[i] - 'a');
                } else if ((a1[i] == a2[i] || a2[i] == a3[i]) && ans == '#') {
                    ans = (char) ('A' + a2[i] - 'a');
                }

            }

            out.println(ans);
        }

    }
}