#include int main() { long long int i,j,k,l,n,m; scanf("%lld%lld",&n,&m); printf("%lld\n",n*m-1); return 0; }