#include using namespace std; int main(){ int A, B; cin >> A >> B; if(A < B) swap(A, B); A = min(A + 1, B); cout << A + B; }