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

namespace Finale
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            int x = Convert.ToInt32(s[0]);
            int y = Convert.ToInt32(s[1]);
            int [,] matrica;
            matrica = new int[x, y];
            int n;
            n = 2 * x + 2 * (y - 2);
            if (y % 2 == 0)
            {
                if (x % 2 == 0)
                {
                    n = 2 * x + 2 * (y - 2) + ((x - 2) / 2) * (y - 2);
                }
                else if (x % 2 != 0)
                {
                    n = 2 * x + 2 * (y - 2) + ((x - 2) / 2) * (y - 2) + ((y - 2) / 2);
                }
            }
            else if (y % 2 != 0)
            {
                if (x % 2 == 0)
                {
                    n = 2 * x + 2 * (y - 2) + ((x - 2) / 2) * (y - 2) + ((x - 2) / 2);
                }
                else if (x % 2 != 0)
                {
                    n = 2 * x + 2 * (y - 2) + ((x - 2) / 2) * (y - 2) + ((y - 2) / 2);
                }
            }
            Console.WriteLine(n);
            Console.ReadLine();
        }
    }
}