from itertools import combinations N,M = list(map(int,input().split())) if(N%2 == 0): print(M*N) else: # のこりの3つで最大化 A = [0,0,0] for i in range(30,-1,-1): if(A[1] + (1< M):continue A[0] += 1<