#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main() { ll x, y; cin >> x >> y; cout << ((x != y) ? (min(x, y)*2 + (max(x, y) - min(x, y) - 1)*2 + 1) : x*2) << endl; }