A, B = [int(i) for i in input().strip().split(' ')] print(min(min(A, B) * 2, A + B - 1))