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

namespace ConsoleApp20
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string[] red = Console.ReadLine().Split(' ');
            int n1 = int.Parse(red[0]);
            int m1 = int.Parse(red[1]);
            int n = Math.Max(n1, m1);
            int m = Math.Min(n1, m1);
            string rez = "";
            if (n == 1 && m == 1) rez = "1";
            else if (n <= 2 || m <= 2) rez = (n * m).ToString();
            else if (n == 3 || m == 3)
            {
                int r = 2 * n + 2 * m - 4;
                int r2 = (n * m) - r;
                int r3 = r2 / 2;
                int rkonacno = r + r3;
                rez = rkonacno.ToString();

            }
            else
            {
                int r = 2 * n + 2 * m - 4;
                int n2 = n - 2;
                int m2 = m - 2;
                int brsaostatkom = m2 / 2;
                int brbezostatka = m2 - brsaostatkom;
                int rk = r + brsaostatkom * ((n2 / 2) + n2 % 2) + brbezostatka * (n2 / 2);
                rez = rk.ToString();


                
                
                  
            }
            Console.WriteLine(rez);
            Console.Read();
        }
    }
}