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

AB = []
AB += [A, B]

def push(AB):
  if AB[0] >= AB[1]:
    i = 0
  else:
    i = 1
  ret = AB[i]
  AB[i] -= 1
  return ret

s = 0
for _ in range(2):
	s += push(AB)

print(s)

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

def f(a,b):
  if a == b:
    ans = a*2
  elif a > b:
    ans = a + (a-1)
  elif a < b:
    ans = b + (b-1)
  return ans

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

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

Solution (Python):


list = [int(a) for a in input().split()]
 

list.sort()
 
num = 0
if list[1] > list[0] + 1:
    num = list[1] * 2 - 1
else:
    num = sum(list)
 
print(num)

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

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

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

for i in range(2):
    if A < B:
         coin = coin + B
         B -= 1
    else:
         coin = coin + A
         A -= 1

print(coin)

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

Solution (Python):

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

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

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

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

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

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

cnt = 2
add = 0

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

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

Solution (Python):
import sys

x, y = map(int, sys.stdin.readline().split())

if x == y:
    print(x * 2)
else:
    print(max(x, y)*2-1)

Solution (Python):
a,b = (int(num) for num in 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(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+=a
        a-=1
    else:
        ans+=b
        b-=1
print(ans)

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

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):
a,b=map(int,input().split())
c=max(a,b)
if(a!=b):
    print(c+c-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(str(cnt))

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

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

Solution (Python):


def main():
    N = [int(x) for x in input().split()]
    max_1 = max(N)
    N[N.index(max(N))] = max(N) - 1
    max_2 = max(N)
    print(max_1+max_2)

if __name__ == '__main__':
    main()

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

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

A = input[0]
B = input[1]

sum = 0

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

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

a.sort(reverse=True)

ans = a[0]

a[0] -= 1

a.sort(reverse=True)

ans += a[0]

print(ans)

Solution (Python):
import sys

line = list(map(int,input().split()))

if line[0] - line[1] >= 2:
	ans = 2*line[0] - 1	
elif line[1] - line[0] >= 2:
	ans = 2*line[1] - 1
else:
	ans = line[0] + line[1]

print(ans)

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

Solution (Python):


A,B = (int(x) for x in 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(max(a, b) + max(a, b) - 1, a + b))

Solution (Python):
a,b=(int(x) for x in 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())
if a==b:
	print(a*2)
elif a>b:
	print(2*a-1)
else :
	print(2*b-1)

Solution (Python):
wklist = list(map(int,input().split()))
ans = 0
for i in range(2):
  ans += max(wklist)
  wklist[wklist.index(max(wklist))] -= 1

print(ans)

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

Solution (Python):
inp = [ i for i in map(int, input().split())]
maximum = 0

patten1 = inp[0] + inp[0]-1
patten2 = inp[0] + inp[1]
patten3 = inp[1] + inp[1]-1

if patten1 > patten2 :
  maximum = patten1
else:
  maximum = patten2

if maximum > patten3:
  print(maximum)
else:
  print(patten3)

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

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

print(score)

Solution (Python):
A, B = [int(x) for x in input().split()]
t = max(A, B)
print(t + max(t - 1, min(A, B)))

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

Solution (Python):
str = input().split()
if int(str[0]) > int(str[1]):
    a = int(str[0])
    if int(str[0])-1 > int(str[1]):
        b = int(str[0])-1
    else:
        b = int(str[1])
else:
    a = int(str[1])
    if int(str[1])-1 > int(str[0]):
        b = int(str[1])-1
    else:
        b = int(str[0])

c = a + b
print(c)

Solution (Python):
a_origin, b_origin = [int(s) for s in input().split(" ")]

def press_x(x, coin):
    coin += x
    x -= 1
    return x, coin

a, b = a_origin, b_origin
coin_aa = 0
a, coin_aa = press_x(a, coin_aa)
a, coin_aa = press_x(a, coin_aa)

a, b = a_origin, b_origin
coin_ab = 0
a, coin_ab = press_x(a, coin_ab)
b, coin_ab = press_x(b, coin_ab)

a, b = a_origin, b_origin
coin_bb = 0
b, coin_bb = press_x(b, coin_bb)
b, coin_bb = press_x(b, coin_bb)

a, b = a_origin, b_origin
coin_ba = 0
b, coin_ba = press_x(b, coin_ba)
a, coin_ba = press_x(a, coin_ba)

print(max([coin_aa, coin_ab, coin_ba, coin_bb]))

Solution (Python):
import sys

if __name__ == '__main__':
    A, B = list(map(lambda x:int(x), sys.stdin.readline().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 num_from_stdin():
    import sys
    return int(sys.stdin.readline())
def nums_from_stdin():
    import sys
    return [ int(num) for num in sys.stdin.readline().strip().split(' ')]

nums = nums_from_stdin()

num = max(nums)

if nums[0] == nums[1]:
    print(num*2)
else:
    print(num*2-1)

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

print(sum(list(sorted([a, a - 1, b, b - 1], reverse=True))[:2]))

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

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

Solution (Python):
S = input().rstrip().split(' ')
o = 0
A = int(S[0])
B = int(S[1])
l = 0
while l < 2:
  if A>=B:
    o +=A
    A-= 1
    l +=1
  else:
    o += B
    B -= 1
    l +=1
print(o)

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

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

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

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

Solution (Python):
a, b = map(int, input().split())
m = [a, b]
m.sort()

if m[1] > m[0] + 1:
    print((2 * m[1]) - 1)

else:
    print(m[0] + m[1])

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

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

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

Solution (Python):
button = map(int, input().split())
button_sort = sorted(button, reverse = True)
sum = button_sort[0]
button_sort[0] = button_sort[0] - 1
button_sort = sorted(button_sort, reverse = True)
sum += button_sort[0]
print (sum)

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

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

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

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

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

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

print("{}".format(result))

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

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

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

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

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=input().split()
a=int(a)
b=int(b)
sum=0
for i in range(1,3):
    sum += max(a,b)
    if (sum == a ):
        a -=1
    elif (sum==b):
        b -=1
print(sum)

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

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

Solution (Python):

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

Solution (Python):
num=list(map(int,input().split()))
ans=0
num.sort(reverse=True)
ans += num[0]
num[0]-=1
num.sort(reverse=True)
ans += num[0]
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 = list(map(int, input().split()))
print(max([2*A-1, A+B, 2*B-1]))

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

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
 
def main():
    input = sys.stdin.readline
    A, B = map(int, input().split())
 
    A, B = max(A, B), min(A, B)
    if A == B:
        return 2 * A
    else:
        return 2 * A - 1
 
 
if __name__ == '__main__':
    print(main())

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

count = 0

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

Solution (Python):
import numpy as np
 
a,b=(int(x) for x in input().split())
sum=0

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

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):
A,B = map(int,input().split())
sum1 = A + (A-1)
sum2 = A + B
sum3 = B + (B - 1)
ans = max(sum1,sum2,sum3)
print(ans)

Solution (Python):


a,b = (int(x) for x in 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):
n , m = map(int , input().split())
print(max(n + m , m * 2 - 1, n * 2 - 1))

Solution (Python):


import sys

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

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

print(ans)

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

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

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

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

c = []

if a == b:
    print(a + b)
    
elif a > b:
    c.append(a)
    a = a - 1
    if a > b:
        c.append(a)
    else:
        c.append(b)
    print(sum(c))
    
elif a < b:
    c.append(b)
    b = b - 1
    if a > b:
        c.append(a)
    else:
        c.append(b)
    print(sum(c))

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

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

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

Solution (Python):
val = input().split()
val_int = [int(n) for n in val]

candidates = [2*val_int[0]-1, val_int[0]+val_int[1], 2*val_int[1]-1]

print(max(candidates))

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):
if __name__ == "__main__":
    p, q = input().split()
    p = int(p)
    q = int(q)
    if p > q:
        answer = p
        p = p - 1
    else:
        answer = q
        q = q - 1
    if p > q:
        answer += p
    else:
        answer += q
    print(answer)

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

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

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

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

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

print(coin)

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

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

c, d = max(a,b), min(a,b)
if c > d:
  print(2*c -1)
else:
  print(2*c)

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

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

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

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

Solution (Python):
def main():
	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)


if __name__ == '__main__':
    main()

Solution (Python):

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


if max(A, B) - 2 >= min(A, B):
    ans = max(A, B) * 2 - 1


else:
    ans = A + B

print(ans)

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

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

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

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

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

inputs = [A, B]
inputs.sort()

button1 = inputs[1]
inputs[1] -= 1
inputs.sort()

button2 = inputs[1]

print(button1 + button2)

Solution (Python):

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

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

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

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

print(count)

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

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

print(count)

Solution (Python):


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

coin = 0

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

print(coin)

Solution (Python):
import sys,math
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float('inf')
MOD = 10**9+7
dy = [0,1,0,-1]
dx = [1,0,-1,0]
ddy = [0,1,1,1,0,-1,-1,-1]
ddx = [1,1,0,-1,-1,-1,0,1]

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

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

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

Solution (Python):


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

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

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("{}".format(2*a-1))
elif(a<b):
  print("{}".format(2*b-1))
else:
  print("{}".format(2*a))

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

Solution (Python):


a,b=map(int,raw_input().split())
if a>b:
 print a+a-1
elif b>a:
 print b+b-1
else:
 print a+b

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

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

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):
def check_max_coin(a,b):
  max_coin = 0
  for i in range(1,3):
    if a < b :
      max_coin += b 
      b-=1 
    else:
      max_coin += a  
      a-=1    
  print(max_coin)
  
a, b = map(int, input().split())
check_max_coin(a,b)

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

Solution (Python):
a, b = map(int, input().split())
a1 = a
a2 = a-1
b1 = b
b2 = b-1

if a == b:
    ans = a1 + b1
elif a > b:
    ans = a1 + a2
elif b > a:
    ans = b1 + b2
print(ans)

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

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

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

print(c)

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):
line = input().strip()
line = line.split(' ')
A = int(line[0])
B = int(line[1])
ans = 0
ans = max(ans, A + A - 1)
ans = max(ans, A + B)
ans = max(ans, B + B - 1)
print(ans)

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

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
if A == B:
    ans = A + B
elif A > B:
    ans = A + (A - 1)
else:
    ans = B + (B - 1)

print(ans)

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

if A > B:
    sum = A + (A - 1)
elif B > A:
    sum = B + (B - 1)
else:  
    sum = A + B

print(sum)

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

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

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

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

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

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

l = [2*a-1, a+b, 2*b-1]

print(max(l))

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

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

Solution (Python):
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 = list(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())
print(max([A + A - 1, B + A, B + B -1]))

Solution (Python):
A, B = [int(i) for i in 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, B + A, B + B -1]))

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

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

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

print(sum)

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

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

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

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

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

print(k)

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

def MaxCoinCount(A,B):
  ans = 0
  if A > B:
    ans = A + (A - 1)
  elif A < B:
    ans = B + (B - 1)
  else:
    ans = A + B
  return ans


print(MaxCoinCount(A,B))

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

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

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

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

Solution (Python):
input_ = list(map(int,input().split()))
x = input_[0]
y = input_[1]
point = max(x,y)
if point == x:
  x -= 1
else:
    y -= 1
point += max(x,y)
print(point)

Solution (Python):







lis=list(map(int,input().split()))
ans=0
if lis[0]>lis[1]:
    ans+=lis[0]
    lis[0]-=1
else:
    ans+=lis[1]
    lis[1]-=1

if lis[0]>lis[1]:
    ans+=lis[0]
else:
    ans+=lis[1]

print(ans)

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

ans = 0


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

    elif a < b:
        ans += b
        b -= 1

print(ans)

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

list_button_coin_1 = [A, B]
list_button_coin_2 = [A-1, B-1]
list_total_coin = []

for i in list_button_coin_1:
	for j in list_button_coin_2:
		list_total_coin.append(i+j)
		
list_total_coin.append(A+B)

print(max(list_total_coin))

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

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

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

Solution (Python):
a, b = list(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 - 1 if a != b else a * 2)

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

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

Solution (Python):
x=[int(i) for i in input().split()]
x.sort()
ans=x[-1]
x[-1]-=1
print(ans+max(x))

Solution (Python):
a,b=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 = map(int,input().split())

result = 0
if a > b:
	result = result + a
	a = a -1
else:
	result = result + b
	b = b -1

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

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

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

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

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

Solution (Python):
A, B = map(int, input().split())
c, d = sorted((A, B))
e, f = sorted((c, d - 1))
print(d + f)

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

Solution (Python):
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
else:
  count += B
print(count)

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

Solution (Python):
a = input().split()
b = int(a[0])
c = int(a[1])
if b > c:
	first = b
	b = b-1
else:
	first = c
	c = c-1
if b > c:
	second = b
else:
	second = c
answer = first + second
print(str(answer))

Solution (Python):
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
a,b=IL()
if a==b:
  print(a+b)
else:
  print(2*max(a,b)-1)

Solution (Python):
A, B = list(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())

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

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

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

Solution (Python):

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

num = 0
for i in range(0,2):
    if a < b:
        num = num + b
        b = b - 1
    elif a > b:
        num = num + a
        a = a - 1
    else:
        num = num + a
        a = a - 1

print(num)

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

Solution (Python):
import numpy as np
x = input()

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

data = np.array([a, b, a-1, b-1])
X = np.sort(data)[::-1]
wa = X[0]+X[1]
print(wa)