using System;
namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();int a=int.Parse(s[0]), b = int.Parse(s[1]);
            Console.WriteLine(a*b!=1?(2*(a+b)-2+(a*b)/2-a-b):1);
        }
    }
}