using System;
					
public class Program
{
	public static void Main()
	{
		string[] s = Console.ReadLine().Split();
		int n = int.Parse(s[0]);
		int m = int.Parse(s[1]);
		if (n>2 && m>2)
			Console.WriteLine((n * m)-(((n-2)*(m/2))-((n-2)/2)));
		else 
			Console.WriteLine(n*m);
		Console.ReadLine();
	}
}