import sys

import numpy as np

arr = [int(i) for i in sys.stdin.readline().split()]

total = 0

select_botton = np.argmax(arr)

for i in range(2):

  total += arr[select_botton]

  arr[select_botton] = arr[select_botton]-1

  select_botton = np.argmax(arr)

print(total)
import sys

a, b = list(map(int,sys.stdin.readline().split()))

total = 0

if a == b:

  total = a + b

else:

  select_btn = max(a, b)

  total = select_btn*2-1

print(total)
import sys
import numpy as np

arr = [int(i) for i in sys.stdin.readline().split()]
total = 0
select_botton = np.argmax(arr)
for i in range(2):
    total += arr[select_botton]
    arr[select_botton] = arr[select_botton] - 1
    select_botton = np.argmax(arr)
print(total)

import sys

a, b = list(map(int, sys.stdin.readline().split()))
total = 0
if a == b:
    total = a + b
else:
    select_btn = max(a, b)
    total = select_btn * 2 - 1
print(total)

-import numpy as np -arr = [int(i) for i in sys.stdin.readline().split()] +a, b = list(map(int, sys.stdin.readline().split())) -select_botton = np.argmax(arr) -for i in range(2): -    total += arr[select_botton] -    arr[select_botton] = arr[select_botton] - 1 -    select_botton = np.argmax(arr) +if a == b: +    total = a + b +else: +    select_btn = max(a, b) +    total = select_btn * 2 - 1