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