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