from sys import exit
A, B = map(int,input().split())

if A == B:
    print(2 * A)
    exit()

m = min(A, B)
M = max(A, B)

ans = 2 * m + 2 * (M - m) - 1 
print(ans)