#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 || B==1) cout << 2 << "\n"; else{ if(A==B) cout << 2*A-1 << "\n"; else if(A+1==B) cout << 2*A << "\n"; else cout << 2*A+1 << "\n"; } }