#include using namespace std; using ll = long long; template using Pa = pair; template using vec = vector; template using vvec = vector>; int main(){ cin.tie(0); ios::sync_with_stdio(false); int A,B; cin >> A >> B; if(A>B) swap(A,B); if(A==1 && B==1) cout << 1 << "\n"; else if(A==1){ cout << (B==2? 2:3) << "\n"; } else{ B--; if(A>B) swap(A,B); if(A==B) cout << 2*A << "\n"; else cout << 2*min(A,B)+1 << "\n"; } }