A, B = map(int, input().split())
small = min(A, B)
large = max(A, B)

if large - small <= 1:
    print(A + B - 1)
else:
    print(2 * small)