#include<iostream> using namespace std; typedef long long LL; int main(){ LL a, b; cin>>a>>b; cout<<a*b-a-b<<" "; return 0; }