n, m = map(int, raw_input().split()) print m*n-1