Problem:
Score : 100 points

Problem Statement

In K-city, there are n streets running east-west, and m streets running north-south. Each street running east-west and each street running north-south cross each other. We will call the smallest area that is surrounded by four streets a block. How many blocks there are in K-city?

Constraints

2 ≤ n, m ≤ 100

Input

Input is given from Standard Input in the following format:

n m

Output

Print the number of blocks in K-city.

Sample Input 1

3 4

Sample Output 1

6

There are six blocks, as shown below:

Sample Input 2

2 2

Sample Output 2

1

There are one block, as shown below:

Solution in C# (Mono 4.6.2.0) (judge verdict: Runtime Error)

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
	static void Main()
	{
		var n = int.Parse(Console.ReadLine());
		var a = Array.ConvertAll(Console.ReadLine().Split(new[] { ' ' }), number => int.Parse(number));

		var fourCount = a.Count(num => num % 4 == 0);
		var twoCount = a.Count(num => num == 2);
		var oneCount = a.Count(num => num == 1);

		if (fourCount > 0) {
			var needs = a.Length / 2;
			if (twoCount >= 2) {
				if (a.Length % 2 == 0) {
					needs -= twoCount / 2;
				} else {
					needs -= (twoCount - 1) / 2;
				}
			}

			Console.WriteLine(fourCount >= needs ? "Yes" : "No");
		} else if (twoCount == a.Length) {
			//4の倍数がなくても、数値が全部2ならOK
			Console.WriteLine("Yes");
		} else {
			//ダメ
			Console.WriteLine("No");
		}


		//デバッグ実行での確認用。そのまま提出しても問題なし
		Console.ReadKey();
	}
}