a, b = [int(v) for v in input().split()] if a < b: a, b = b, a if a == b: print(a + b + 1) else: print(2 * b + 1 + 2 * (a - b - 1) )