Problem:
 Score : 100 points    Problem Statement There are two buttons, one of size A and one of size B .  When you press a button of size X , you get X coins and the size of that button decreases by 1 .  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?      Constraints  All values in input are integers.  3 \leq A, B \leq 20         Input Input is given from Standard Input in the following format:  A  B       Output Print the maximum number of coins you can get.        Sample Input 1 5 3      Sample Output 1 9  You can get 5 + 4 = 9 coins by pressing the button of size 5 twice, and this is the maximum result.       Sample Input 2 3 4      Sample Output 2 7       Sample Input 3 6 6      Sample Output 3 12

Solution (Python):
A,B=map(int,input().split())
if A<B:
  A,B=B,A
if A==B:
  print(2*A)
else:
  print(A+A-1)

Solution (Python):
icase=0
if icase==0:
    a,b=map(int,input().split())
    x=max(a,b)
    y=max(min(a,b),x-1)
    print(x+y)

Solution (Python):
a,b=map(int,input().split())

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

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

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

Solution (Python):
linha = input()
A,B = [int(n) for n in linha.split()]
lista = []
lista.append(A)
lista.append(B)
if A == B:
    print(A + B)
else:
    print(max(lista) + (max(lista) - 1))

Solution (Python):
line = input()
A,B = [int(n) for n in line.split()]

if(abs(A-B) >= 2):
    res = max(A,B)+(max(A,B)-1)
else:
    res = A+B
print(res)

Solution (Python):
line = input()
a, b = [int(n) for n in line.split()]
sum = 0
sum += max(a, b)
c = max(a, b)
d = min(a, b)
c-=1
sum+=max(c, d)
print(sum)

Solution (Python):
i = input().split()

a = int(i[0])
b = int(i[1])

once = a + b

twiceA = a + a - 1

twiceB = b + b -1

if once > twiceA and once > twiceB:
    print(once)
elif twiceA > twiceB:
    print(twiceA)
else:
    print(twiceB)

Solution (Python):
bottons=[]
for x in input().split():
    bottons.append(int(x))
if bottons[0]>bottons[1]:
    max=bottons[0]+(bottons[0]-1)
elif bottons[1]>bottons[0]:
    max=bottons[1]+(bottons[1]-1)
else:
    max=sum(bottons)

print(max)

Solution (Python):
bottons=[]
for x in input().split():
    bottons.append(int(x))
if bottons[0]>bottons[1]:
    max=bottons[0]+(bottons[0]-1)
elif bottons[1]>bottons[0]:
    max=bottons[1]+(bottons[1]-1)
else:
    max=sum(bottons)

print(max)

Solution (Python):
a, b = map(int, input().split())
maior = max(a, b)
if abs(max(a, b) - min(a, b)) >= 2:    
    print(max(a, b) + max(a, b) - 1)
else:
    print(a+b)

Solution (Python):
a, b = map(int, input().split())
if a + b >= a + a - 1 and a + b >= b + b - 1:
    print(a+b)
elif a + a - 1 >= a + b and a + a - 1 >= b + b - 1:
    print(a + a - 1)
elif b + b - 1 > a + b and b + b - 1 >= a + a - 1:
    print(b + b - 1)

Solution (Python):
line = input()
a, b = [int(n) for n in line.split()]

soma0= a + b

soma1 = a 
a = a-1
soma1 = soma1 + a 
a = a-1 

soma2 = b
b = b-1
soma2 = soma2 + b
b = b-1

if soma0>=soma1 and soma0>=soma2:
    print(soma0)

elif soma1>=soma0 and soma1>=soma2:
    print(soma1)

else:
    print(soma2)

Solution (Python):
line = input()
A,B = [int(n) for n in line.split()]
if A == B:
    print(2*A)
else:
    print(2*max(A,B)-1)

Solution (Python):
A, B = map(int, input().split())

ans=0
for _ in range(2):
	if (A>=B):
		maior=A
		A-=1
	else:
		maior=B
		B-=1
	ans += maior
		
print(ans)

Solution (Python):
buttons=[]
for x in input().split():
    buttons.append(int(x))
if buttons[0]>buttons[1]:
    max=buttons[0]+(buttons[0]-1)
elif buttons[1]>buttons[0]:
    max=buttons[1]+(buttons[1]-1)
else:
    max=sum(buttons)

print(max)

Solution (Python):
numerosSTR = input().split(" ")
for i in numerosSTR:
    a = int(numerosSTR[0])
    b = int(numerosSTR[1])
if 2*a-1 > 2*b-1:
    if (2*a-1) > a+b:
        print(2*a-1)
    else:
        print(a+b)
else:
    if 2*b-1 > a+b:
        print(2*b-1)
    else:
        print(a+b)

Solution (Python):
a = [int(x) for x in input().split()]
a.sort()
maior = 0
maior += a[-1]
a[-1] -= 1
a.sort()
maior += a[-1]
print(maior)

Solution (Python):
line = input()
numbers = [int(n) for n in line.split()]
predicted_value = max(numbers[0]+numbers[1], numbers[0]*2-1, numbers[1]*2-1)
print(predicted_value)

Solution (Python):
line = input()

a, b = [int(n) for n in line.split()]

apb = a+b

aa = a+(a-1)
bb = b+(b-1)

print(max(apb, max(bb, aa)))

Solution (Python):
line = input()

a, b = [int(n) for n in line.split()]

apb = a+b

aa = a+(a-1)
bb = b+(b-1)

print(max(apb, max(bb, aa)))

Solution (Python):
a, b = [int(x) for x in input().split()]

points = 0
for _ in range(2):
    if a > b:
        points += a
        a -= 1
    else:
        points += b
        b -= 1
print(points)

Solution (Python):
a, b = map(int, input().split())
ans = 0
for i in range(2):
     if a > b:
          ans += a
          a -= 1
     else:
          ans += b
          b -= 1
print(ans)

Solution (Python):

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

Solution (Python):
A, B = map(int, input().split())
if A == B:
    print(A+B)
else:
    print(2*max(A, B) - 1)

Solution (Python):
A, B = map(int,input().split())
print(max(2*A-1,A+B,2*B-1))

Solution (Python):
import math
import collections
import sys

input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

a,b=MI()
L=[a,a-1,b,b-1]
L=sorted(L,reverse=True)
print(L[0]+L[1])

Solution (Python):
a, b = map(int, input().split())
print(max(a, b) + max(max(a, b) - 1, min(a, b)))

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

Solution (Python):
l=list(map(int,input().split()))
print(2*max(l)-1 if max(l)>min(l) else 2*max(l))

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

Solution (Python):
a,b=map(int, input().split())
if a==b:
  print(a*2)
else:
  print(max([a,b])*2-1)

Solution (Python):
a,b = map(int,input().split())
print(max(a+a-1,a+b,b+b-1))

Solution (Python):
A, B = map(int, input().split())
print(max(A, B) + max(max(A,B)-1, min(A,B)))

Solution (Python):
a,b=map(int,input().split())
a1=a-1
b1=b-1
print(max(a+b,a+a1,a+b1,b+a1,b+b1))

Solution (Python):
A, B = [int(i) for i in input().split(' ')]
     
def f():
    res = 0
    if A > B and A - 1 > B:
        res = A + A - 1
    elif B > A and B - 1 > A:
        res = B + B - 1
    else:
        res = A + B
    return res
print(f())

Solution (Python):
A, B = map(int, input().split())
print(max(2*A-1, 2*B-1, A+B))

Solution (Python):
a,b = map(int,input().split())

print(max(a,b) + max(max(a,b)-1,min(a,b)))

Solution (Python):
A,B = map(int,input().split())

if A < B:
  print(2*B-1)
elif A == B:
  print(A+B)
else:
  print(2*A-1)

Solution (Python):
A,B = map(int,input().split())
res = 0
for _ in range(2):
  if A>=B:
    res += A
    A-=1
  else:
    res += B
    B-=1
print(res)

Solution (Python):
A, B = map(int, input().split())
print(max(2*A-1, A+B, 2*B-1))

Solution (Python):
a,b = list(map(int,input().split()))
if a > b:
    print(a+a-1)
elif a < b:
    print(b+b-1)
else:
    print(a+b)

Solution (Python):
ary1 = list(map(int,input().split()))
ary2 = ary1 + [x-1 for x in ary1]
ary2.sort()
print(ary2[2]+ary2[3])

Solution (Python):
a,b=map(int,input().split())
count=0
for i in range(2):
  if a>=b:
    count+=a
    a-=1
  else:
    count+=b
    b-=1
    
print(count)

Solution (Python):
a, b = map(int, input().split())

ans = 0
for i in range(2):
  if a < b:
    ans += b
    b -= 1
  else:
    ans += a
    a -= 1

print(ans)

Solution (Python):
a, b = map(int, input().split())
if a>=b:
    c = a
    a -= 1
else :
    c = b
    b -= 1
if a>b :
    d = a
    a -= 1
else :
    d = b
    b -= 1
print(c + d)

Solution (Python):
a,b = map(int, input().split())

total =0

for i in range(2):
    if a >= b:
        total+=a
        a-=1
    else:
        total+=b
        b-=1

print(total)

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]



A, B = mi()

if B > A:
    A, B = B, A

if A-1 >= B:
    print(2*A-1)
else:
    print(A+B)

Solution (Python):
A,B=map(int,input().split())
print(max(A+(A-1),B+(B-1),A+B))

Solution (Python):
A, B = map(int, input().split())
l = max(A, B)
if A != B:
  print(l + (l - 1))
else:
  print(2*l)

Solution (Python):
a, b = map(int, input().split())
if a > b:
    print(2*a-1)
elif a < b:
    print(2*b-1)
else:
    print(a+b)

Solution (Python):
a,b=map(int,input().split())
if a>b:
  print(a+a-1)
elif a<b:
  print(b+b-1)
else:
  print(a+b)

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

Solution (Python):
x,y=map(int,input().split())
z=max(x,y)-1
e=max(x,y,z)
if x==y:
    print(2*x)
else:
    print(z+e)

Solution (Python):
bottun=[int(i) for i in input().split()]
bottun.sort()
a=bottun[0]
b=bottun[1]

if a<b:
    print(2*b-1)
else:
    print(2*b)

Solution (Python):
A, B = map(int, input().split())
coin = 0
coin += max(A, B)
coin += max(min(A, B), max(A, B)-1)
print(coin)

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

Solution (Python):
a, b = map(int, input().split())
ans = 0

if a > b:
    ans += a
    a -= 1
    if a > b:
        ans += a
    else: ans += b
    
elif a <= b:
    ans += b
    b -= 1
    if a > b:
        ans += a
    else: ans += b

print(ans)

Solution (Python):
a,b = map(int,input().split())
tmp = max(a,b)
tmp2 = min(a,b)

print(tmp+max(tmp-1,tmp2))

Solution (Python):

import sys
input = sys.stdin.readline
import numpy as np









A,B = map(int,input().split())

print(max(A+max(A-1,B), B+max(A,B-1)))

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

Solution (Python):

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

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

Solution (Python):
s = sorted(map(int, input().split()))
print(s[1]*2 - 1 if s[1] - s[0] > 1 else sum(s))

Solution (Python):
a, b = map(int, input().split())

if a >= b:
  ans = a
  a -= 1
else:
  ans = b
  b -= 1

ans += max(a, b)
print(ans)

Solution (Python):
A,B=map(int,input().split())
print(max(A+(A-1),B+(B-1),A+B))

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

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    a, b = input_nums()
    if abs(a-b) > 1: print(max(2*a-1, 2*b-1))
    else: print(a+b)

if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int,input().split())
print(max(a+b,a+a-1,b+b-1))

Solution (Python):
A,B = map(int,input().split())
n = 0
for i in range(2):
  if A < B:
    n += B
    B -= 1
  else:
    n += A
    A -= 1
print(n)

Solution (Python):
A, B = map(int,input().split())

print(max(A,B)+max(max(A,B)-1,min(A,B)))

Solution (Python):
a,b=map(int,input().split())
ans=0
if a-b>=2:
    ans=2*a-1
elif b-a>=2:
    ans=2*b-1
elif a==b:
    ans=2*a
else :
    ans= min(a,b)*2+1
print(ans)

Solution (Python):
a,b = map(int,input().split())
ans = 0

for _ in range(2):
    if a > b:
        ans += a
        a -= 1
    else:
        ans += b
        b -= 1

print(ans)

Solution (Python):
x=list(map(int,input().split()))
print(max(2*x[0]-1,sum(x),2*x[1]-1))

Solution (Python):
x=list(map(int,input().split()))
if x[0]==x[1]:
  print(sum(x))
else:
  print(sum(list(range(min(x),max(x)+1))[-2:]))

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a,b = LI()
ans = max(a+a-1,a+b,b+b-1)
print(ans)

Solution (Python):
A,B=map(int,input().split())
print(max(2*A-1,2*B-1,A+B))

Solution (Python):
a,b=map(int,input().split())
print(max(a+b,max(a,b)+max(a-1,b-1)))

Solution (Python):
import numpy as np
import sys
a, b = map(int, input().split())
A = np.array([a + (a - 1), b + (b - 1), a + b])
print(np.max(A))

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

Solution (Python):
A, B = map(int, input().split())
if A > B:
    print(A + A - 1)
elif A == B:
    print(A + A)
else:
    print(B + B - 1)

Solution (Python):
AB = list(map(int,input().split()))
AB.sort()
ans = AB[1]
AB[1] -= 1
print(ans + max(AB))

Solution (Python):
a,b = map(int,input().split())
print(max(a+b,a+a-1,b+b-1))

Solution (Python):
A, B = map(int, input().split())
ans = 0
if A >= B:
    ans += A
    A -= 1
else:
    ans += B
    B -= 1
print(ans+max(A, B))

Solution (Python):
A,B=map(int,input().split())
count=0

if A==B:
  count=A+B
  
elif A>B:
  count=count+A+A-1
  
elif A<B:
  count=count+B+B-1

print(count)

Solution (Python):

a, b = [int(s) for s in input().split()]
print(max(a * 2 - 1, a + b, b * 2 -1))

Solution (Python):
A,B=map(int,input().split())
lis=[A,A-1,B,B-1]
C=sorted(lis)
print(C[-1]+C[-2])

Solution (Python):
A, B = map(int, input().split())
ans = 0
for _ in range(2):
    if A >= B:
        ans += A
        A -= 1
    else:
        ans += B
        B -= 1
print(ans)

Solution (Python):
def main():
    a, b = map(int, input().split())
    print(max(a+a-1, a+b, b+b-1))

if __name__ == '__main__':
    main()

Solution (Python):
p,q= input().split()
(a,b) =(int(p), int(q))
size_bottum = [a,b]
total = 0
if a is not b:
    total +=max(size_bottum)
    total +=max(size_bottum) -1
else:
    total += a*2
print(total)

Solution (Python):
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect




from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

def main():
  a, b = map(int, readline().split())
  print(max(a+a-1,a+b,b+b-1))
  
  
if __name__ == '__main__':
  main()

Solution (Python):
A,B=map(int,input().split())
a1=A+A-1
a2=A+B
b=B+B-1
print(max(a1,a2,b))

Solution (Python):
A,B = map(int,input().split())
ans = 0
if A > B:
    ans += A
    A -=1
    if A > B:
        ans += A
    else :
        ans += B
else :
    ans += B
    B -= 1
    if A > B:
        ans += A
    else :
        ans += B
print(ans)

Solution (Python):
import itertools
import fractions
def main():
  a,b = map(int,input().split())
  ans = 0
  for i in range(2):
    if a >= b:
      ans += a
      a -=1
    else:
      ans += b
      b -=1
  print(ans)
if __name__ == '__main__':
  main()

Solution (Python):
a, b = map(int, input().split())

if a == b:
    ans = 2*a
else:
    if a > b:
        ans = a + (a-1)
    else:
        ans = b + (b-1)
print(ans)

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()

A,B = map(int, input().split())

print(max(A+A-1, A+B, B+B-1))

Solution (Python):
a,b = map(int,input().split())
print(max(a+a-1,a+b,b+b-1))

Solution (Python):
a,b = map(int,input().split())
print(max(a+a-1,a+b,b+b-1))

Solution (Python):
x, y = map(int,input().split())

if x == y:
  ans = x * 2
elif x > y:
  ans = 2*x - 1
else:
  ans = 2*y - 1

print(ans)

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

Solution (Python):
a, b = map(int, input().split())

if a == b:
  print(2*a)
elif a>b:
  print(2*a-1)
else:
  print(2*b-1)

Solution (Python):
a, b = map(int, input().split())
if a == b:
    print(2 * a)

elif max(a, b) - min(a, b) >= 1:
    print(max(a, b) * 2 - 1)

Solution (Python):
a, b = map(int, input().split())
c = 2
d = []
while c > 0:
    if a > b :
        d.append(a)
        a -= 1
        c -= 1
    else:
        d.append(b)
        b -= 1
        c -= 1
print(d[0] + d[1])

Solution (Python):
A, B  = map(int, input().split())
ans = 0

ans = ans + max(A, B)
if A >= B:
  A = A-1
else:
  B = B-1

ans = ans + max(A, B)
print(ans)

Solution (Python):
a,b = (int(x) for x in input().split())
ans = 0
for i in range(2):
    ans += max([a,b])
    if ans==a:
        a -= 1
    else:
        b -= 1
print(ans)

Solution (Python):
import sys

a, b = map(int, sys.stdin.readline().split())
if b > a:
    a, b = b, a

def main():
    if a == b: res = a * 2
    else: res = a * 2 - 1
    print(res)

if __name__ ==  '__main__':
    main()

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

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    count = max(a[0]*2-1,a[1]*2-1 ,a[0]+a[1])
    print(count)

Solution (Python):
A, B = map(int, input().split())
if A==B:
    print(2*A)
else:
    print(2*max(A, B)-1)

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
a,b = iim()

ans = 0

if a>b:
    ans += a
    ans += max(a-1,b)
else:
    ans += b
    ans += max(a,b-1)

print(ans)

Solution (Python):
A,B = map(int,input().split())
x = sorted([A, B])
first = x.pop(-1)
y = sorted([first-1, x.pop()])
second = max(y)
print(first+second)

Solution (Python):
a,b = map(int,input().split())
print(max(a,b) + max(min(a,b),max(a,b)-1) )

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

Solution (Python):
A, B = map(int, input().split())

cnt = max(A, B)

if (A >= B):
    A -= 1
else:
    B -= 1

cnt += max(A, B)

print(cnt)

Solution (Python):
a,b = map(int,input().split())
c=max(a,b)
print(c+max(c-1,min(a,b)))

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

Solution (Python):
A,B =map(int,input().split())
 
print(max(A*2-1,A+B,B*2-1))

Solution (Python):
a,b=map(int,input().split());print(max(a+b,a*2-1,b*2-1))

Solution (Python):
import collections
import math

def main():
    A, B = map(int, input().split())
    ans = 0

    if A < B:
        ans+=B
        B-=1
    else:
        ans+=A
        A-=1
    if A < B:
        ans+=B
        B-=1
    else:
        ans+=A
        A-=1
    print(ans)

    return 0


if __name__ == '__main__':
    main()

Solution (Python):
A,B = map(int,input().split())
if abs(A-B) >= 2:
    print(max(A,B)*2-1)
else:
    print(A+B)

Solution (Python):
a, b = map(int, input().split())
print(max(a + a - 1, b + b - 1, a + b))

Solution (Python):
a, b = map(int, input().split())

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

Solution (Python):
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

A, B = map(int, input().split())

if A == B:
    print(A + B)
elif A > B:
    print(2 * A - 1)
else:
    print(2 * B - 1)

Solution (Python):
a,b = map(int,input().split())
print(max(a+b,a+a-1,b+b-1))

Solution (Python):












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

if b >= a:
    a,b = b,a

ans = a + max(a-1,b)

print(ans)

Solution (Python):
A,B = map(int,input().split())

print(max(A+A-1,A+B,B+B-1))

Solution (Python):
def main():
  
  
  
  a,b = list(map(int,input().split()))
  
  ans = 0
  
  for i in range(2):
    if a >= b:
      ans += a
      a -= 1
    else:
      ans += b
      b -= 1
  print(ans)
  
if __name__ == '__main__':
  main()

Solution (Python):
A, B = map(int, input().split())
if A == B:
  print(2*A)
else:
  print(2*max(A, B)-1)

Solution (Python):
a, b = map(int, input().split())
if a == b:
    print(a + b)
else:
    c = max(a, b)
    print(c + c - 1)

Solution (Python):
A,B=map(int,input().split())
C=max(A,B)
if C==A:
  D=max(A-1,B)
else:
  D=max(A,B-1)
print(C+D)

Solution (Python):

A, B = map(int, input().split())

M = max(A, B)
N = min(A, B)

if abs(A - B) >= 1:
    ans = M + (M - 1)
else:
    ans = M + N
print(ans)

Solution (Python):
A,B = map(int,input().split())

score = 0
if A >= B:
    score= score + A
    A = A - 1    
else:
    score = score + B
    B = B - 1

if A >= B:
    score = score + A
    A = A - 1
else:
    score = score + B
    B = B - 1
    
print(score)

Solution (Python):
A, B = map(int, input().split())
print(max(2*A-1, 2*B-1, A+B))

Solution (Python):
ans = 0
a,b = map(int,input().split())
for i in range(2):
  max_num = max(a,b)
  min_num = min(a,b)
  ans = ans + max_num
  a = max_num - 1
  b = min_num
print(ans)

Solution (Python):
a, b = map(int, input().split())

if a > b:
    print(a+(a-1))
elif b > a:
    print(2*b-1)
else:
    print(a+b)

Solution (Python):
a,b=map(int,input().split())
cnt=0
for i in range(2):
    if a>=b:
        cnt+=a
        a-=1
    else:
        cnt+=b
        b-=1
print(cnt)

Solution (Python):
N , M = (map(int , input().split()))
ans = 0
if N > M:
    ans += N
    N -= 1
else:
    ans += M
    M -= 1
if N > M:
    ans += N
else:
    ans += M
print(ans)

Solution (Python):
A, B = map(int, input().split())
if A>=B+1:
    print(2*A-1)
elif A+1<=B:
    print(2*B-1)
elif A==B:
    print(2*A)

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

Solution (Python):
a, b = map(int, input().split())

x = a + a-1
y = b + b-1
z = a + b 
print(max(x,y,z))

Solution (Python):
a,b=map(int,input().split())

print(max(a+b,a+a-1,b+b-1))

Solution (Python):
a, b = map(int, input().split())

ma = max(a,b)
ma += max(max(a,b)-1,min(a,b))

print(ma)

Solution (Python):
a,b = map(int, input().split())

ans = max(a + b, a + a - 1)
ans = max(ans, b + b - 1)

print(ans)

Solution (Python):
a,b = map(int, input().split())
c = 0

for i in range(2):
    if a >= b:
        c = c + a
        a = a -1
    else:
        c = c + b
        b = b -1
print(c)

Solution (Python):
x,y=map(int,input().split())
ans=0
ans=max(ans,x+x-1)
ans=max(ans,x+y)
ans=max(ans,y+y-1)
print(ans)

Solution (Python):
x,y=map(int,input().split())
print(max(max(x,y)*2-1,x+y))

Solution (Python):
A, B = map(int, input().split())
ans = 0
if A == B : ans = A + B
elif A > B : ans = 2 * A - 1
else : ans = 2 * B - 1
print(ans)

Solution (Python):
A, B = map(int, input().split())

if A==B:
  print(A+B)
else:
  print(max([A,B])*2-1)

Solution (Python):
A,B=map(int,input().split())
ans=0
for i in range(2):
    if A>=B:
        ans=ans+A
        A=A-1
    else:
        ans=ans+B
        B=B-1
print(ans)

Solution (Python):


def main():
    AB = list(map(int, input().split()))

    result = 0

    for i in range(2):
        max_num = max(AB)
        result += max_num
        AB[AB.index(max_num)] = max_num - 1
    
    print(result)

if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, input().split())
if a < b:
  print(2*b-1)
elif a > b:
  print(2*a-1)
else:
  print(2*a)

Solution (Python):
a, b = map(int, input().split())
if a > b:
	print(2*a-1)
elif a < b:
  print(2*b-1)
else:
  print(2*a)

Solution (Python):
a, b = map(int, input().split())
ans = 0

if a >= b:
    ans = a
    a = a - 1
else:
    ans = b
    b = b - 1

if a >= b:
    print(ans + a)
else:
    print(ans + b)

Solution (Python):
a,b=map(int,input().split())
print(max(a+(a-1),a+b,b+(b-1)))

Solution (Python):
x,y=map(int,input().split())
if x!=y:
  print(max(x,y)*2-1)
else:
  print(x*2)

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

Solution (Python):
A,B = map(int,input().split())
if abs(A-B) >= 2:
    print(max(A,B)*2-1)
else:
    print(A+B)

Solution (Python):
a, b = map(int, input().split())
print(max(a + a - 1, b + b - 1, a + b))

Solution (Python):
A,B = map(int,input().split())
X1 = max(A,B)
X2 = 0
if X1-1>min(A,B):
    X2 = X1-1
elif X1-1<=min(A,B):
    X2 = min(A,B)
print(X1+X2)

Solution (Python):
A,B = map(int,(input().split()))
print(max(2*A-1,2*B-1,A+B))

Solution (Python):
a, b = [int(x) for x in input().split()]
print(max(2 * a - 1, a + b, 2 * b - 1))

Solution (Python):
X, Y = map(int, input().split())
ans = 0
for _ in range(2):
    if X > Y:
        ans += X
        X -= 1
    else:
        ans += Y
        Y -= 1
print(ans)

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

Solution (Python):
a, b = map(int, input().split())

ans = 0
for _ in range(2):
	if a > b:
		ans += a
		a -= 1
	else:
		ans += b
		b -= 1
	
print(ans)

Solution (Python):
a,b = map(int,input().split())
if a >b:
    print(2*a-1)
elif a == b:
    print(a+b)
else:
    print(2*b-1)

Solution (Python):
a,b = map(int,input().split());c = 0
if a >= b:
    c += a
    a = a - 1
    if a >= b:
        c += a
    
    else:
        c += b
    
else:
    c += b
    b = b - 1
    if a >= b:
        c += a
    else:
        c += b
        
print(c)

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

Solution (Python):
A,B = map(int,input().split(" "))

if A>B:
  if A-1>B:
    print(int(A*2)-1)
  else:
    print(A+B)
else:
  if B-1>A:
    print(int(B*2)-1)
  else:
    print(A+B)

Solution (Python):
a,b = map(int,input().split())
ans = max(a,b)
min_number = min(a,b)
ans += max(ans-1,min_number)
print(ans)

Solution (Python):
A,B=map(int,input().split())
ans=0
for i in range(2):
  if A>B:
    ans+=A
    A-=1
  else:
    ans+=B
    B-=1
print(ans)

Solution (Python):
def main():
    ab = list(map(int, input().split()))
    ans = 0
    for _ in range(2):
        button = max(ab)
        indx = ab.index(button)
        ans += button
        ab[indx] -= 1
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
a, b = map(int, input().split())
c = 0
for i in range(2):
  if a>b:
    c += a
    a -= 1
  else:
    c += b
    b -= 1
print(c)

Solution (Python):
a,b = map(int, input().split())
ans = 0
for i in range(2):
    if a > b:
        ans += a
        a -= 1
    else:
        ans += b
        b -= 1
print(ans)

Solution (Python):
a,b=map(int,input().split())
print(max(a,b)+max(a-1,b) if a>=b else max(a,b)+max(a,b-1))

Solution (Python):
A,B = map(int,input().split())

ans = 0
if A >= B:
    ans += A
    A -= 1
else:
    ans += B
    B -= 1

if A >= B:
    ans += A
    A -= 1
else:
    ans += B
    B -= 1

print(ans)

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

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

Solution (Python):
A,B = map(int,input().split())
if A >= B:
  if A-1 >= B:
    print(A*2-1)
  else:
    print(A+B)
else:
  if B-1 >= A:
    print(B*2-1)
  else:
    print(A+B)

Solution (Python):
A,B = map(int,input().split())
if max(A,B) > min(A,B):
    ans = max(A,B)*2-1
else:
    ans = A*2
print(ans)

Solution (Python):
A,B=map(int,input().split())

score=0

for i in range(2):
    score+=max(A,B)
    if A>=B:
        A-=1
    else:
        B-=1
print(score)

Solution (Python):
a,b = map(int,input().split())
print(max(a,b)+min(max(a-1,b),max(a,b-1)))

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

Solution (Python):
from fractions import gcd

A, B = map(int, input().split())

if A == B:
  print(2*A)
else:
  print(max(A,B)*2-1)

Solution (Python):

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

ans = max(a, b)
if a > b:
    a -= 1
else:
    b -= 1
ans += max(a, b)
print(ans)

Solution (Python):
a,b=(map(int,input().split()))
i=2
c=0
while i>0:
  if a>=b:
    c=a+c
    a=a-1
  elif a<b:
    c=b+c
    b=b-1
  i-=1
print(c)

Solution (Python):
x=list(map(int, input().split()))

if abs(x[0]-x[1])>=2:
	if x[0]<x[1]:
		print(x[1]*2-1)
	else:
		print(x[0]*2-1)
else:
	print(x[0]+x[1])

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

Solution (Python):
a,b = map(int,input().split())
l = [a,b,a-1,b-1]
l = sorted(l)
print(l[-1] + l[-2])

Solution (Python):
A,B=map(int, input().split())
print(max(A,B)*2 if A==B else max(A,B)*2-1)

Solution (Python):
a, b = map(int, input().split())

ans = 0


for i in range(2):
    if a >= b:
        ans += a
        a -= 1
    else:
        ans += b
        b -= 1

print(ans)

Solution (Python):

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

sum=0
for i in range(2):
    if a>=b:
        sum+=a
        a-=1
    else:
        sum+=b
        b-=1

print(sum)

Solution (Python):
a, b = list(map(int, input().split()))
result = 0

for i in range(2):
    if a >= b:
        result += a
        a -= 1
    else:
        result += b
        b -= 1

print(result)

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

Solution (Python):
import numpy as np

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

ans = 0
for i in range(2):
    if(a>=b):
        ans = a + ans
        a = a -1
    else:
        ans = b + ans
        b = b -1

print(ans)

Solution (Python):
a, b = map(int, input().split())


if a > b:
    ans = a + max(a-1, b)
else:
    ans = b + max(a, b-1)
print(ans)

Solution (Python):
a,b=map(int,input().split())
if a<b:
  print(2*b-1)
elif a>b:
  print(2*a-1)
else:
  print(a+b)

Solution (Python):
A,B=map(int,input().split())
print(max(2*A-1,2*B-1,A+B))

Solution (Python):
A, B = map(int, input().split(" "))
if A < B:
    print(B + (B - 1))
elif A == B:
    print(A * 2)
else:
    print(A + (A - 1))

Solution (Python):


buttons = list(reversed(sorted(map(int, input().rstrip().split(" ")))))

ans = buttons[0]

buttons.append(buttons[0]-1)
buttons = list(reversed(sorted(buttons[1:])))

ans += buttons[0]

print(ans)

Solution (Python):
stdin = input().split(" ")
A = int(stdin[0])
B = int(stdin[1])
AA = BB = AB = 0

AA += A + A - 1
BB += B + B - 1
AB += A + B
sums = [AA,BB,AB]
print(max(sums))

Solution (Python):


A,B = list(map(int, input().rstrip().split()))


cnt=0
for i in range(2):
  if A>=B:
    cnt += A
    A -= 1
  else:
    cnt += B
    B -= 1
  
print( cnt )

Solution (Python):
A, B = map(int, input().split())

ans = 0

if A >= B:
  ans += A
  A -= 1
else:
  ans += B
  B -= 1

if A >= B:
  ans += A
  A -= 1
else:
  ans += B
  B -= 1
  
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

A, B = map(int, input().split())
out = 0
if A > B:
    out += A
    A -= 1
else:
    out += B
    B -= 1
if A > B:
    out += A
    A -= 1
else:
    out += B
    B -= 1
print(out)

Solution (Python):



def main():
  a, b = map(int, input().split())
  print(sum(sorted([a, b, a-1, b-1])[-2:]))

if __name__=='__main__':
  main()

Solution (Python):
A, B = map(int, input().split())

if A < B: A, B = B, A
ans = A + max(A-1, B)
print(ans)