using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        { 
            string[] k = Console.ReadLine().Split();
            int n = Convert.ToInt32(k[0]);
            int m = Convert.ToInt32(k[1]);
            long s = n * m;
            long prvi = ((m - 2) / 2) * (n - 2);
            long drugi = ((((m - 2) / 2) * (n - 2)) + (((n - 2) / 2) + 1));
            if ((m - 2) % 2 == 0)
                Console.WriteLine(s - prvi);
            else
                Console.WriteLine(s - drugi);
        }
    }
}