import math import sys def inp(): return int(raw_input()) def linp(): return map(int, raw_input().split()) n, m = linp() print n*m - 1