#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #pragma comment(linker, "/STACK:256000000") using namespace std; typedef long long int int64; typedef long double double80; const int INF = (1 << 29) + 5; const int64 LLINF = (1ll << 59) + 5; const int MOD = 1000 * 1000 * 1000 + 7; int64 n, m; map, int64> ans; int64 get_ans(int64 x, int64 y) { if (x > y) swap(x, y); if (x == 0) return 0; if (x == 1) return y - 1; if (ans.count(make_pair(x, y))) return ans[make_pair(x, y)]; if (y & 1) return 1 + y + 2 * get_ans(x, y / 2); else return 1 + 2 * get_ans(x, y / 2); } int main() { //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); cin >> n >> m; cout << n * m - 1; fclose(stdin); fclose(stdout); return 0; }