r,c=map(int,input().split())
if r==c:
  print(2*r-4)
else:
  print((r*c+1)//2-1)