#include using namespace std; #ifdef LOCAL #include "debug.h" #else #define DEBUG(...) #endif int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int a, b; cin >> a >> b; if (a > b) { swap(a, b); } cout << min(2 * a, a + b - 1) << '\n'; }