简单的一个数学定理
#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
using namespace std;
typedef long long LL;
const int N = 1010;
int n,m;
LL res;
int main(){
scanf("%d%d",&n,&m);
res = (LL)n * m - n - m;
printf("%lld\n",res);
return 0;
}