import math x,y=map(int, raw_input().split()) print x*y - 1