// // main.cpp // 101 Hack 42 // // Created by Albastroiu Radu on 10/18/16. // Copyright © 2016 Albastroiu Radu. All rights reserved. // #include #include #include #include #include #include #include #include #include #include using namespace std; long long n,i,j,m,x,c,count,nr,OK,suma,k, level , val, y, z; int main() { /* #ifndef ONLINE_JUDGE freopen("date.in","r",stdin); freopen("date.out","w",stdout); #endif */ cin>>n>>m; x = 1; y = 1; i = max(x,n-1); j = max(y,m-1); cout << (n-1) + n*(m-1); return 0; }