#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 << min(x, y)*2 + (max(x, y) - min(x, y) - 1)*2 + 1 << endl; }