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