using System;
namespace Takmicenje2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string[] unos = Console.ReadLine().Split(' ');
            long n = long.Parse(unos[0]);
            long m = long.Parse(unos[1]);

            long min = 2 * m + (2 * (n - 2)) + ((n - 2) / 2 + 1) * (m / 2 - 1) + ((n - 2) / 2) * (m / 2);
            
            Console.WriteLine(min);
        }
    }
}