#include using namespace std; int main(){ int A, B; cin >> A >> B; if(A > B) swap(A, B); int ans = min(A+B-1, 2*A); cout << ans << endl; return 0; }