#include #include #include #include int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ /*long long int arr[1000000000][1000000000],m,n,i,j,p,q,r,s*/ long long int m,n,prod; scanf("%lld %lld",&m,&n); if(m==1) printf("%lld",n-1); else if(n==1) printf("%lld",m-1); else { prod=(m-1)+m*(n-1); printf("%lld",prod); } /*arr[0][0]=0; arr[0][1]=arr[1][0]=1; for(i=0;i