#!/bin/python3 import sys n,m = input().strip().split(' ') n,m = [int(n),int(m)] j=0 k=0 if(n%2!=0 or n%2==0 and n>0): j=n-1 if(m%2!=0 or m%2==0 and m>0): k=m-1 print(m*n-1)