#include using namespace std; int main() { int n, m; cin >> n >> m; cout << 1LL * n * m - 1 << endl; return 0; }