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