using System;
using System.Collections.Generic;
using System.Security.Authentication.ExtendedProtection;

namespace yes1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();

            double n = double.Parse(s[0]);
            double m = double.Parse(s[1]);

            if (n <= 2 || m <= 2)
            {
                Console.Write(n * m);
            }
            else
            {
                double p = m * n;

                double a = n - 2;
                double b = m - 2;

                Console.Write(p - Math.Ceiling(a * b / 2));
            }
        }
    }
}