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

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

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

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

-print((max(a, b) * 2 - 1 + int(a == b))) +print((max(2 * a - 1, 2 * b - 1, a + b)))