#!/bin/python3 import sys n,m = input().strip().split(' ') n,m = [int(n),int(m)] print((n*m)-1)