A,B=(int(x) for x in input().split()) if A==B: print(A+B-1) elif A>B: print(B*2) elif B>A: print(A*2)