#include <cstdint>
#include <iostream>

using namespace std;
using ll = int64_t;

ll a,b;

int main(){
    ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
    cin>>a>>b;
    cout<<(a*b-(a+b))<<'\n';
}