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

namespace PETLJA
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s1 = Console.ReadLine().Split();
            int a = int.Parse(s1[0]);
            int b = int.Parse(s1[1]);
            int u = a * b;
            if (a == 1 || b == 1 || a == 2 || b == 2)
            {
                Console.WriteLine(u);
            }
            else
            {
                int x = a - 2;
                int y = b - 2;
                int z = x * y;
                int p;
                if (z % 2 == 0)
                {
                    p = z / 2;
                }
                else
                {
                    p = z / 2 + 1;
                }
                Console.WriteLine(u-p);
            }
        }
    }
}