#include <iostream>
#include <cstdio>

using namespace std;

int main () {
	long long n, m;
	cin >> n >> m;
	cout << (n * m) - 1 << endl;
	
	return 0;
}