#include using namespace std; using pii = pair; using ll = long long; #define rep(i, j, n) for(int i = j; i < (int)(n); i++) const ll MOD = 1000000007; const ll INFL = (1LL << 60); const int INFI = (1 << 30); int main() { int A, B; cin >> A >> B; if (A == B) cout << 2 * A - 1 << endl; else cout << 2 * min(A, B) << endl; }