N,M=map(int,input().split()) if N%2==0: print(N*M) else: A1=0 A2=0 for i in range(len(bin(M)[2:])): if (M>>i)&1==0: A1+=1<