using System;

class main
{
  static void Main()
  {
    var s = Console.ReadLine().Split();
    Int64 n = Int64.Parse(s[0]);
    Int64 m = Int64.Parse(s[1]);
    if(n==1)
        Console.WriteLine(m);
    else if(m==1)
        Console.WriteLine(n);
    Console.WriteLine((n + m + (n * m)/2 - 2));
  }
}