A,B = map(int, input().split()) N = min(A, B) * 2 print(N - (N == A + B))