using System;

namespace Zadaci
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] temp = Console.ReadLine().Split();
            int n, m;
            n = int.Parse(temp[0]);
            m = int.Parse(temp[1]);
            int b = (n-2)/2;
            int c = (m-2)/2;
            if (n % 2 != 0 && m % 2 != 0) Console.WriteLine(n * 2 + (m - 2) * 2 + (b + 1) * c + (c + 1) * b);
            else if (n % 2 == 0 && m % 2 == 0) Console.WriteLine(n * 2 + (m - 2) * 2 + b * c + c * b);
            else if (n % 2 != 0 && m % 2 == 0) Console.WriteLine(n * 2 + (m - 2) * 2 + b * c + (b + 1) * c);
            else if (n % 2 == 0 && m % 2 != 0) Console.WriteLine(n * 2 + (m - 2) * 2 + b * c + (c + 1) * b);
        }
    }
}