#include #include #include #include #include using namespace std; int main() { long long n,m; cin>>n>>m; long long sum = 0; if(n == 1 || m == 1) { if(n == 1) sum = m-1; else sum = n-1; } else { if(n > m) { long temp = n; n = m; m = temp; } sum = m-1; sum += (n-1)*m; } cout<