using System;

namespace Takmicenje
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] st = Console.ReadLine().Split();
            int n = int.Parse(st[0]);
            int m = int.Parse(st[1]);
            int z = 2 * (n + m - 2);
            m -= 2;
            n -= 2;
            z += n * m / 2 + (n % 2 == 0 || m % 2 == 0 ? 0 : m / 2 - 1);
            Console.WriteLine(z);
        }
    }
}