//An Emperor Production //in Association with Assistant Professor MR Ram Kripal Mishra. //Copyright (C) 2016,2015 CodeGeeks, Inc., //B-217 KIT, First Floor, Rooma, Kanpur, INDIA //Everyone is permitted to copy and distribute verbatim copies //of this code, but changing it is not allowed. #include using namespace std; #define ln pf("\n") #define sp pf(" ") #define loop(a,b) for(int i=a;i=b;i--) #define pb push_back #define ppb pop_back() #define pf printf #define pi pair #define sf scanf #define swi switch #define vec vector #define veci vector #define vecs vector #define boost1 ios::sync_with_stdio(false); #define boost2 cin.tie(0); #define MOD 1000000007 typedef long long ll; typedef string str; void ins(string &s){getline(cin,s);} double power(ll x, ll y){double temp;if( y == 0)return 1;temp = power(x, y/2);if (y%2 == 0)return temp*temp;else{if(y > 0)return x*temp*temp;else return (temp*temp)/x;}} str to_binary(ll n){str S;if(n==1)return "1";else{S+=to_binary(n>>1);S+=(n%2+'0');}return S;} void in(int &V){cin>>V;} void in(ll &V){cin>>V;} int inr(){int V;cin>>V;return V;} void in(char &V){cin>>V;} void in(string &V){cin>>V;} void out(int V){cout<>m>>n; if(m>n) out((m-1)+m*(n-1)); else out((n-1)+n*(m-1)); return 0; }