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