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

namespace ConsoleApplication1
{
    class Program
    {
        static ulong najmanji(ulong[,] mat, ulong n, ulong m)
        {
            ulong br = 0;
            for (ulong i = 0; i < n; i++)
            {
                for (ulong j = 0; j < m; j++)
                {
                    if (i == 0 || i == n - 1 || j == 0 || j == m - 1)
                    {
                        br++;
                    }
                    else if (i != 0 || i != n - 1 && j != 0 || j != m - 1)
                    {
                        if (i % 2 != 0)
                        {
                            if (j % 2 == 0) br++;
                        }
                        else
                        {
                            if (j % 2 != 0) br++;
                        }
                    }
                }
            }
            return br;
        }
        static void Main(string[] args)
        {
            string red = Console.ReadLine();
            string[] delovi = red.Split();
            ulong n = ulong.Parse(delovi[0]);
            ulong m = ulong.Parse(delovi[1]);
            ulong [,] mat = new ulong[n, m];
            Console.WriteLine(najmanji(mat, n, m));
            Console.ReadLine();
        }
    }
}