n, m = map(int, input().split()) ans = 0 min_ = min(n, m) ans = min_ * 2 n -= min_ m -= min_ if n >= 1 or m >= 1: ans += 1 print(ans - 1)