using System;
					
 class Program
{
    static void Main()
	{
		string[] s = Console.ReadLine().Split();
        int[] a = new int[s.Length];
        for (int i = 0; i < s.Length; i++) a[i] = int.Parse(s[i]);
        int m = a[0];
        int n = a[1];
        int p = (m - 2) * (n - 2);
        if (p % 2 == 0) Console.WriteLine(n * m - p / 2);
        else Console.WriteLine(n * m - (p + 1) / 2);
	}
}