大意略。
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cstring>
#include <cmath>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
int main()
{
int n, m;
while(~scanf("%d%d", &n, &m)) printf("%d\n", n*m-1);
return 0;
}