#include using namespace std; int main() { int A, B; cin >> A >> B; int ans = min(A, B) * 2; if (A == B) ans--; cout << ans << endl; return 0; }