a, b = map(int, input().split()) if a > b: a, b = b, a if a == b: print(a + b) else: print(a * 2 + 1 + (b - a - 1) * 2)