#include using namespace std; int main() { std::ios::sync_with_stdio(false); long long N, M; cin >> N >> M; cout << (N * M) - 1 << endl; return 0; }