#include using namespace std; int main(){ int n, m; cin >> n >> m; long long res = (long long) n*m - 1; cout << res << '\n'; return 0; }