fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main () {
  4. long m, n, p;
  5. cin >> m >> n;
  6. p= (m*n - (m + n - 1)) + 1;
  7. cout << p << endl;
  8. return 0;
  9. }
Success #stdin #stdout 0s 3416KB
stdin
2 3
stdout
3