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

if a == b:

  print((a*2))

else:

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

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

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

-if a == b: -    print((a * 2)) -else: -    print((max(a, b) * 2 - 1)) +print((max(a + b, 2 * a - 1, 2 * b - 1)))