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