N, M = map(int, input().split()) print(min(N, M) * 2 + (max(N, M) - min(N, M)) * 2 - 1)