#include #include #include #include #include using namespace std; typedef long long ll; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ ll a, b; cin>>a>>b; ll ans = min(a-1+a*(b-1), b-1+b*(a-1)); cout<