#include "bits/stdc++.h" using namespace std; int main() { long long A, B; cin >> A >> B; if (A != B) cout << min(A, B) * 2 << endl; else cout << A * 2 - 1 << endl; }