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)
        {
            long n, m;
            string[] k = Console.ReadLine().Split();
                if (Convert.ToInt64(k[0]) > Convert.ToInt64(k[1]))
                {
                    n = Convert.ToInt64(k[0]);
                    m = Convert.ToInt64(k[1]);
                }
                else
                {
                    m = Convert.ToInt64(k[0]);
                    n = Convert.ToInt64(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 && n > 2)
            {
                if ((m - 2) % 2 == 0)
                    Console.WriteLine(s - prvi);
                else
                    Console.WriteLine(s - drugi);
            }
            else Console.WriteLine(m * n);

        }
    }
}