import heapq

a, b = list(map(int, input().split()))

print((sum(heapq.nlargest(2, [a, a-1, b, b-1]))))

a, b = list(map(int, input().split()))

print((max([a+b, 2*a-1, 2*b-1])))

import heapq

a, b = list(map(int, input().split()))
print((sum(heapq.nlargest(2, [a, a - 1, b, b - 1]))))

a, b = list(map(int, input().split()))
print((max([a + b, 2 * a - 1, 2 * b - 1])))

-import heapq - -print((sum(heapq.nlargest(2, [a, a - 1, b, b - 1])))) +print((max([a + b, 2 * a - 1, 2 * b - 1])))