A, B = map(int, input().split()) a = max(A, B) b = min(A, B) if a == 0 and b == 0: print(0) elif a == 0: print(2 * b - 1) elif b == 0: print(2 * a - 1) elif a == b: print(2 * a) else: print(2 * b + 2 * (a - b) - 1)