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):
def slove():
    import sys
    import heapq
    input = sys.stdin.readline
    ab = [-i for i in list(map(int, input().rstrip('\n').split()))]
    heapq.heapify(ab)
    t = 0
    for i in range(2):
        p = heapq.heappop(ab)
        t -= p
        heapq.heappush(ab, p + 1)
    print(t)


if __name__ == '__main__':
    slove()

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

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

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())
ab=[a,(a-1),b,(b-1)]
ab.sort()
print(ab[2]+ab[3])

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

Solution (Python):

A, B = map(int, input().split())
print(A + max(A-1, B) if max(A,B) == A else B + max(A, B-1))

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

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

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

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

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

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

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

Solution (Python):


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

ans = 0
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())
if a == b:
    print(a + b)
elif a > b:
    print(a + (a - 1))
else:
    print(b + (b - 1))

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

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

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

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

ans = 0

lis = [A+A-1,A+B,B+B-1]

print(max(lis))

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

Solution (Python):
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """5 3"""
        output = """9"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """3 4"""
        output = """7"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """6 6"""
        output = """12"""
        self.assertIO(input, output)

def resolve():
    X=[int(i) for i in input().split()]
    m=max(X)
    
    print(2*m if X[0]==X[1] else 2*m-1)


if __name__ == "__main__":
    resolve()

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

if __name__ == "__main__":
    f_a()

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

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

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

ans = 0
for _ in range(2):
    ans += max(button)
    button[max(range(len(button)), key=lambda i:button[i])] -= 1

print(ans)

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

Solution (Python):
bt = input()
bt_A, bt_B = bt.split()
bt_max, bt_min = max(int(bt_A), int(bt_B)), min(int(bt_A), int(bt_B))
max_num = bt_max + max(bt_max - 1, bt_min)
print(max_num)

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(2*A-1, 2*B-1, A+B))

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())

coin = 0


if a > b:
  coin += a
  a -= 1
else:
  coin += b
  b -= 1

if a > b:
  coin += a
else:
  coin += b

print(coin)

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

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

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

C = 0

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

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

if B == A:
   C = B+A
   print(C)

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

total = 0

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

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

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

A=a+max(a-1,b)
B=b+max(a,b-1)

print(max(A,B))

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

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

ans_1 = A + B
ans_2 = 2 * A - 1
ans_3 = 2 * B - 1
ans = max(ans_1, ans_2, ans_3)
print(ans)

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

print(coin)

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

sum_coin = 0
tmp = max(A, B)
sum_coin += tmp
if tmp == A:
    A += -1
else:
    B += -1
tmp = max(A, B)
sum_coin += tmp
print(sum_coin)

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

print(ans)

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

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

if ( A > B ):
  x += A
else:
  x += B

print ( x )

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())
ans=0
count=0
for i in range(2):
	if  A >= B:
		ans += A
		A= A-1
		count = i
	else:
		ans += B
		B = B-1
		count = i

print(ans)

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

Solution (Python):

a = list(map(int,input().split()))
a.sort()
if a[0] == a[1]:
  print(2 * a[1])
else:
  print(2 * a[1] - 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())
p = max(a, b)
if a == b:
  print(2*p)
else:
  print(2*p - 1)

Solution (Python):
a, b = map(int, input().split())
c = 0
for i in range(0, 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
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 + b)
else:
    print(max(a, b) + max(a, b) - 1)

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

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

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

x = 0

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


print(x)

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

ans = 0
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())
if A == B:
    print(A*2)
else:
    print(max(A,B)*2 -1)

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(a*2 if a==b else max(a,b)*2-1)

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(2*a 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) + (max(a,b) - 1))

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

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

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

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

cnt = 0

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

print(cnt)

Solution (Python):
M,N = [int(x) for x in input().split()]
print(M+N if M==N else 2*max(M,N)-1)

Solution (Python):
a,b=map(int,input().split())
ans = 0
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(2*max(a,b)-(a!=b))

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

Solution (Python):
a,b = map(int, input().split())
ans = 0
if a>b:
    ans+=a
    if a-1>b:
        ans += a-1
    else:
        ans += b
else:
    ans += b
    if b-1>a:
        ans += b-1
    else:
        ans +=a
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())
if abs(a-b)>=2:
  print(max(a,b)*2-1)
if abs(a-b)<=1:
  print(a+b)

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

r = 0
for i in range(2):
	s.sort()
	s.reverse()
	r += s[0]
	s[0] -= 1

print (r)

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

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

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

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

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

if a > b:
    ans += a
else:
    ans += b

print(ans)

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

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

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

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

B=[x+(x-1) for x in A ]

sum=A[0]+A[1]
num=max(B)

if num > sum:
    print(num)    
else:
    print(sum)

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

ans = 0
for i in range(2):
    push = max(A, B)
    if push == A:
        ans += A
        A = A - 1
    else:
        ans += B
        B = B - 1

print(ans)

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

c=0

if a>b:
  c+=a
  a=a-1
else:
  c+=b
  b=b-1
  
if a>b:
  c+=a
  a=a-1
else:
  c+=b
  b=b-1
print(c)

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

Solution (Python):
a = sorted(map(int,input().split()))
print(max(2 * a[1] - 1, a[0] + a[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())

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

if A > B:
  sum += A
else:
  sum += B

print(sum)

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

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

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

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

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

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

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())
if a - b >= 1:
    print(2*a-1)
elif b - a >= 1:
    print(2*b-1)
elif a == b:
    print(a+b)

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

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

l = sorted([a,b,a-1,b-1],reverse = True)

print(l[0]+ l[1])

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

Solution (Python):

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

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

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

Solution (Python):
s=list(input().split())
a=int(s[0])
b=int(s[1])
count=0
button=0
while(button<2):
  if a>=b:
    count+=a
    a-=1
  else:
    count+=b
    b-=1
  button+=1

print(count)

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

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

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(" "))
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, 2*a - 1,2*b - 1))

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

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

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

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

if __name__ == '__main__':
    main()

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

a,b=x[0],x[1]

y = (max(a,b))

resultado1 = (y*2)-1
resultado2 = a+b

print(max(resultado1,resultado2))

Solution (Python):
x = input().split()
A = int(x[0])
B = int(x[1])
if (A > B):
  print((A*2) - 1)
elif (A == B):
  print(A * 2)
else:
  print((B*2) - 1)

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

if A>B+1:
    print(2*A-1)
elif B > A+1:
    print(2*B-1)
else:
    print(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*a)
else: print(2*max(a,b)-1)

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
A, B = map(int, input().split())
ans = 2*A-1
if ans < 2*B-1:
	ans = 2*B -1
if ans < A + B:
	ans = A + B

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([2*a-1,a+b,2*b-1]))

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

ans = 0
for _ 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())
print(max(2*a-1,2*b-1,a+b))

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())
print(int(max(2*a-1,2*b-1,a+b)))

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())
x = max(a, b)
y = max(x - 1, min(a, b))
print(x + y)

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
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())

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())
print(sum(sorted([A, A-1, B, B-1])[2:]))

Solution (Python):


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


res = max([A*2-1, A+B, B*2-1])


print(res)

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())
S = 0
if A == B:
  S = 2 * A
else:
  S = 2 * max(A, B) - 1
  
print(S)

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())

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

main()

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

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

num_list = [A, B]
first_num = max(num_list)
first_choice_index = num_list.index(first_num)
num_list[first_choice_index] = num_list[first_choice_index] - 1
second_num = max(num_list)

print(first_num + second_num)

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

Solution (Python):
a,b = map(int,input().split())
count = 0
counter = 0
while counter !=2:
    if a > b:
        count+=a
        a -=1
        counter +=1
    else:
        count+=b
        b-=1
        counter +=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):
x = list(map(int, input().split()))
print(max(x) * 2 - 1) if min(x) != max(x) else print(x[0] * 2)

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

print(max(x, y) + max(max(x, y)-1, min(x,y)))

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

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(2 * a - 1, 2 * b - 1, a + b))

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

if large == small:
    print(large*2)
else:
    print(large*2-1)

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

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

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

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

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())
ans = 0
for _ in range(2):
    if a < b:
        ans+=b
        b-=1
    else:
        ans+=a
        a-=1
print(ans)

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

def main():
    A,B = map(int, input().split())
    a = [2*A-1, A+B, 2*B-1]
    print(max(a))

if __name__ == '__main__':
    main()

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 abs(A-B) >= 2 :
	print(max([A,B])*2-1)
elif abs(A-B) == 1 :
	print(A+B)
else :
	print(A*2)

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

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

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

A = [a, b, a-1, b-1]
A.sort()
print(A[-1] + A[-2])

Solution (Python):
def MAP(): return map(int,input().split())

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

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

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

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

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

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

Solution (Python):
A,B = map(int,input().split())
def button(A,B):
  aa= A+(A-1)
  ab = A+B
  bb = B+(B-1)
  if aa>=bb and aa>=ab:
    return aa
  if bb>=aa and bb>=ab:
    return bb
  if ab>=aa and ab>=bb:
    return ab
print(button(A,B))

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())
 
r1 = max(a,b)
 
if r1 == a:
  a -= 1
else:
  b -= 1
r2 = max(a,b)
 
print(r1+r2)

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())

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*2-1,a+b,b*2-1))

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

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

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

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

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

ma = max(AB)
print(ma + max(ma-1,AB[0]))

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())
print(max(a + a - 1, b + b - 1,
          a + b))

Solution (Python):


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

Solution (Python):

A,B = list(map(int, input().split()))
if A == B:
    print(A + B)
else:
    print(max(A,B) + max(A, B)-1)

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

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

print(ans)

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

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

Solution (Python):
A,B = list(map(int, input().split()))
print(max(A+A-1, A+B, 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

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

print(ans)

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

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

print(answer)

Solution (Python):
x=list(map(int,input().split()))
x.sort(reverse=True)
if x[0]-x[1]>=2:
  print(2*x[0]-1)
else:
  print(x[0]+x[1])

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

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

Solution (Python):
a,b=map(int,input().split())
A=sorted([a,b,a-1,b-1],reverse=True)
print(A[0]+A[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())
if a > b:
    print(2 * a - 1)
elif a == b:
    print(2 * a)
else:
    print(2 * b - 1)

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

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

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

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

Solution (Python):
a, b = map(int, input().split())
val1 = a + (a-1)
val2 = b + (b-1)
val3 = a + b
print(max([val1, val2, val3]))

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

print(X)

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())
print(max(A+B,2*A-1,2*B-1))

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

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

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

Solution (Python):
x,y = map(int,input().split())	
if(x==y):
    print(2*x)
else:
    print(2*max(x,y)-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 >= 2:
    print(a+a-1)
elif b-a >= 2:
    print(b+b-1)
else:
    print(a+b)

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

import fractions 
sys.setrecursionlimit(1000000)

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())

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

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

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 = list(map(int, input().strip().split()))

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

print (ans)

Solution (Python):
ans = 0
N = list(map(int, input().split()))
for _ in range(2):
    N.sort(reverse=True)
    ans += N[0]
    N[0] -= 1
print(ans)

Solution (Python):


def main():
    A, B = map(int, input().split())
    if A == B:
        return 2 * A
    elif A > B:
        return 2 * A -1
    else:
        return 2 * B -1

if __name__ == '__main__':
    print(main())

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

Solution (Python):



b,c = map(int,raw_input().split())
sum = 0
for i in range(2):
    if b<c:
        sum += c
        c = c-1
    else:
        sum += b
        b = b-1

print sum

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

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

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

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

Solution (Python):
a,b=map(int,input().split())
print(a+b if a==b else max(a,b)+max(a,b)-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 = 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(a*2 if a==b else max(a,b)*2-1)

Solution (Python):
a, b = map(int, input().split())
if 3 <= a <= 20 and 3 <= b <= 20:
    print(max(a + a - 1, a + b, b + b -1))
else:
    print('invalid value')

Solution (Python):
a, b = list(map(int, input().split()))
answer = []
if a > b:
    answer.append(a)
    a -= 1
else:
    answer.append(b)
    b -= 1
answer.append(max(a, b))
print(sum(answer))

Solution (Python):
def main():
    A, B = map(int, input().split())
    return max([2*A-1, 2*B-1, A+B])


if __name__ == '__main__':
    print(main())

Solution (Python):
numbers = [int(i) for i in input().split()]

num1 = numbers[0]
num2 = numbers[1]

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

print (sum)

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

if A>B:
    getcoin=A
    A=A-1
elif A ==B:
    getcoin=A
    A=A-1
else:
    getcoin=B
    B=B-1

    
if A>B:
    getcoin+=A
elif A==B:
    getcoin+=A
else:
    getcoin+=B

print(getcoin)

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