#include using namespace std; int main() { int A, B; cin >> A >> B; if (A > B) { cout << B * 2 << endl; } else if (A < B) { cout << A * 2 << endl; } else { cout << A * 2 - 1 << endl; } }