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