using System;
namespace Takmicenje2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string[] unos = Console.ReadLine().Split(' ');
            int n = int.Parse(unos[0]);
            int m = int.Parse(unos[1]);


            int min=0;

            for (int i = 0; i <n; i++)
            {
                for (int j = 0; j < m; j++)
                {
                    if (i == 0 || i == n - 1 || j == 0 || j == m - 1) min++;
                    else
                    {
                        if(i%2==0)
                        {
                            if (j % 2 != 0) min++;
                        }
                        else
                        {
                            if (j % 2 == 0) min++;
                        }
                    }
                }
            }

            Console.WriteLine(min);
        }
    }
}