a, b = map(int, input().split()) cnt = 2 * min(a, b) - 1 if (a+b) % 2 == 1 or abs(a-b) >= 2: cnt += 1 print(cnt)