A, B = map(int,input().split()) ans = min(A,B) * 2 if A == B:ans -= 1 print(ans)