using System;

class Program
{
    static void Main()
    {
        string[] red = Console.ReadLine().Split(' ');

        Console.WriteLine((long.Parse(red[0]) * long.Parse(red[1]) + 
            2 * (long.Parse(red[0]) + long.Parse(red[0])) - 4) / 2);
        Console.ReadKey();
    }
}