using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection.Metadata.Ecma335;
using System.Runtime.ExceptionServices;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] matr = Console.ReadLine().Split();
            int n = int.Parse(matr[0]);
            int m = int.Parse(matr[1]);
            int c = 2 * (m + n - 2);
            int zbir = c + (n*m-c)/2;
            Console.WriteLine(zbir);
        }
    }
}