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

namespace ConsoleApp19
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string[] red = Console.ReadLine().Split(' ');
            int n = int.Parse(red[0]);
            int m = int.Parse(red[1]);
            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 r2 = (n * m) - r;
                int n2 = n - 2;
                int m2 = m - 2;
                if (m2 % 2 != 0 && m2 < n2)
                {
                    int brsaostatkom = m2 / 2;
                    int brbezostatka = m2 - brsaostatkom;
                    int rk = r + brsaostatkom * (n2 / 2) + n2 % 2 + brbezostatka * (n2 / 2);
                    rez = rk.ToString();
                }
                else if (n2 % 2 != 0 && n2 < m2)
                {
                    int brsaostatkom = n2 / 2;
                    int brbezostatka = n2 - brsaostatkom;
                    int rk = r + brsaostatkom * (m2 / 2) + m2 % 2 + brbezostatka * (m2 / 2);
                    rez = rk.ToString();

                }
                else if (n2 % 2 != 0 && m2 % 2 != 0 && m2 == n2)
                {
                    int brsaostatkom = n2 / 2;
                    int brbezostatka = n2 - brsaostatkom;
                    int rk = r + brsaostatkom * (m2 / 2) + m2 % 2 + brbezostatka * (m2 / 2);
                    rez = rk.ToString();

                }
                else if (m2 % 2 == 0 && m2 < n2)
                {
                    int brsaostatkom = m2 / 2;
                    int brbezostatka = m2 - brsaostatkom;
                    int rk = r + brsaostatkom * (n2 / 2) + n2 % 2 + brbezostatka * (n2 / 2);
                    rez = rk.ToString();

                }
                else if (n2 % 2 == 0 && n2 < m2)
                {
                    int brsaostatkom = n2 / 2;
                    int brbezostatka = n2 - brsaostatkom;
                    int rk = r + brsaostatkom * (m2 / 2) + m2 % 2 + brbezostatka * (m2 / 2);
                    rez = rk.ToString();

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