    #include<bits/stdc++.h>
    using namespace std;
    typedef long long LL;
    #define rep(i,a,b) for(int i=(a);i<=(b);i++)
    #define mem(a,x) memset((a),x,sizeof (a))
    #define lson l,mid,rt<<1
    #define rson mid+1,r,rt<<1|1
    const LL LLINF = 0x3f3f3f3f3f3f3f3f;
    int main() {
    #ifdef _DEBUG
        freopen("data.in", "r", stdin);
    #endif
        ios::sync_with_stdio(false);
        int a,b;
        while(cin>>a>>b){
            int s=a+b-1;
            cout<<a*b-s<<endl;
        }
        return 0;
    }