//tumi cheye acho tai ami pothe hete jai
//hete hete bohudur bohudur jete chai
//ami_nafi

#include <bits/stdc++.h>
using namespace std;
#define pii pair <int, int>
#define vi vector <int>
#define pb push_back
typedef long long ll;
const int M = 1e6 + 20, MOD = 1e9 + 20;
int main () {
   int a, b;
   cin >> a >> b;
   int k = a * b - a - b + 1;
   cout << k << endl;
return 0;
}
