inp = map(int,raw_input().split()) print inp[0]*inp[1]-1