using System;
using System.CodeDom;

namespace Takmicenje_petlja_2
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            string inputLine1 = Console.ReadLine();
            string[] temp1 = new string[2];
            temp1 = inputLine1.Split();
            int n = int.Parse(temp1[0]);
            int m = int.Parse(temp1[1]);
            bool[,] filed = new bool[n,m];
            int counter = 0;
            for (int i = 1; i < n - 1; i++)
            {
                for (int j = 1; j < m - 1; j++)
                {
                    if (!filed[i + 1, j] && !filed[i - 1, j] && !filed[i, j + 1] && !filed[i, j - 1])
                    {
                        filed[i, j] = true;
                        counter++;
                    }
                }
            }

            Console.WriteLine(n*m - counter);
        }
    }
}