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