using System;

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]);
            if (n < 3 && m < 3) Console.Write(n*m);
            else if (n % 2 == 1 && m % 2 == 1) Console.Write(n * m - ((n - 2) * (m - 2) / 2 +1));
            else Console.Write(n * m - ((n - 2) * (m - 2) / 2));
        }
    }
}