#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ long int n, m, result; cin >> n; cin >> m; result = (n - 1) + n * (m - 1); // (n -1) + (m - 1) cout << result; return 0; }