#include #include #include #include int main() { long long int n,m,sum=0; scanf("%lld %lld",&n,&m); /*if(n>m) { sum += m-1; } else if(nm) sum+=(n-1)*m; else if(n