#include using namespace std; unsigned long long N, M; int main() { cin >> N >> M; cout << N * M - 1LL; return 0; }