using System;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n, m;
            string[] ss = Console.ReadLine().Split();
            n = int.Parse(ss[0]);
            m = int.Parse(ss[1]);
            int brRedara = 0;
            if (n != 1 && m != 1)
            {
                brRedara = (n * 2 + m * 2 - 4);
                n -= 2; m -= 2;
                for (int i = 0; i < n; i++)
                {
                    brRedara += m / 2 + i % 2;
                }
                Console.WriteLine(brRedara);
            }
            else
            {
                Console.WriteLine(m + n - 1);
            }
            
        }
    }
}