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())
ans=0
ans+=max(a,b)*2
if a!=b:
  ans-=1
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())

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

    print(ans)

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


c = 0
for i in range(2):
    j = max(A)
    ind = A.index(j)
    c += j
    A[ind] -= 1

print(c)

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

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

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

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

get_coin = 0

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

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

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

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

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

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

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

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

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

Solution (Python):

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

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


tmp = max(a,b)
if(a==tmp):
    a-=1
else:
    b-=1
tmp2 = max(a,b)
print(tmp+tmp2)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

a, b = na()

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,open(0).read().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):
from collections import defaultdict
from string import ascii_uppercase
import sys, bisect, math
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

a,b = read_int()

def solve(a,b):
    ans = 0
    ans += max(a,b)
    if ans == a:
        a -= 1
    else:
        b -= 1
    ans += max(a,b)
    return ans

if __name__ == "__main__":
    print(solve(a,b))

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

Solution (Python):
import sys

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

Solution (Python):

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

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

print(n)

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

print(Ans)

Solution (Python):
A, B = (int(x) for x in input().split())

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

print(max(t))

Solution (Python):
import numpy as np

a, b = np.sort([int(x) for x in input().split(" ")])

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

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):
buttons = list(map(int, input().split()))
buttons.sort(reverse=True)
ans = 0
ans += buttons[0]
buttons[0] = buttons[0] - 1
buttons.sort(reverse=True)
ans += buttons[0]
print(ans)

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 = map(int, input().split(" "))
ans = 0
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())
sum = 0
if a <= b:
    sum = b
    b = b-1
else:
    sum = a
    a = a-1

if a <= b:
    sum = sum + b
else:
    sum = sum + a

print(sum)

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

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

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

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

x = int(A) + int(B)
y = 2*int(A) - 1
z = 2*int(B) - 1

print(max(x,y,z))

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

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

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=list(map(int,input().split(" ")))
coin=[A+(A-1),B+(B-1),A+B]
print(max(coin))

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):
import numpy as np

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

total = 0

for _ in range(2):
  idx = np.argmax(buttons)
  total += buttons[idx]
  buttons[idx] -= 1
 
print(total)

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

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


print(counter)

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

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

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

Solution (Python):



AB = input().split(' ')
A = int(AB[0])
B = int(AB[1])

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

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

res=0

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

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

print(res)

Solution (Python):
x,y = map(int,input().split())
ans = 0
if x < y:
    ans += y
    y -= 1
else:
    ans += x
    x -= 1

if x < y:
    ans += y
else:
    ans += x

print(ans)

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

Solution (Python):
print((lambda x:2*max(x[0], x[1])-1 if x[0]!=x[1] else 2*x[0])(tuple(map(int, input().split()))))

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

sum = 0

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

print(str(sum + max(A, B)))

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

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

Solution (Python):
line = raw_input()
A, B = list(map(int,line.split(' ')))

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

Solution (Python):



def solv(a, b):
    ans = max(a+a-1, b+b-1, a+b)
    return ans


if __name__ == '__main__':

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

    ans = solv(a, b)

    print(ans)

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

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

print(coins)

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

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):
import sys
import numpy as np

reatInt = lambda: int(sys.stdin.readline())
reatIntN = lambda: [int(v) for v in sys.stdin.readline().split(' ')]


a, b = reatIntN()
ma = max(a, b)
mi = min(a, b)

ret = (2 * ma - 1) if 2 <= (ma - mi) else (ma + mi)
print(ret)

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

Solution (Python):
import itertools
import sys

def main():
    a, b = input().split()
    a = int(a)
    b = int(b)
    print(max(a, b) + max([min(a, b), max(a, b)-1]))

if __name__ == '__main__':
    main()

Solution (Python):
import sys
import sys
input = sys.stdin.readline
a,b = input().split()
a = int(a)
b = int(b)
coin = 0
if a > b:
    coin += a
    a -= 1
else:
    coin += b
    b -= 1
if a > b:
    coin += a
    a -= 1
else:
    coin += b
    b -= 1
print(coin)

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):
import sys
input = sys.stdin.readline
a, b = map(int, input().split())

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

Solution (Python):

A = list(map(int, input().split()))
B = list(map(lambda x:x-1, A))

print(sum(sorted(A + B,reverse=True)[:2]))

Solution (Python):
import numpy as np

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

ans = 0
for i in range(2):
    if n[0] < n[1]:
        ans += n[1]
        n[1] -= 1
    else:
        ans += n[0]
        n[0] -= 1
print(ans)

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

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= [int(x) for x in input().split()]

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

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

ret = [A, A-1, B, B-1]
ret.sort(reverse=True)

print(sum(ret[0:2]))

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

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

print(ans)

Solution (Python):
s=input().split(' ')
a=int(s[0])
b=int(s[1])
x0=2*a-1
x1=2*b-1
x2=a+b

print(max((x0,x1,x2)))

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

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

if A > B:
	val = A
	A-=1
else:
	val = B
	B-=1

val+=max(A,B)

print(val)

Solution (Python):
import sys, copy
input = sys.stdin.readline
A, B = (int(x) for x in input().split())
print(max(2*A-1, 2*B-1, 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())
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())
r = 0
for i in range(2):
  if a > b:
    r += a
    a -= 1
  else:
    r += b
    b -= 1
print(r)

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

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

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

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

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

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


if __name__ == "__main__":
    main()

Solution (Python):
A, B = [int(i) for i in input().split()]
large = max(A, B)

ans = A + B
if A != B:
    ans = large + large - 1

print(ans)

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

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

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

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a,b = f()
    c = [a,b, a-1, b-1]
    c.sort()
    print(c[3]+c[2])


solve()

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

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

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

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

print(ans+max(a,b))

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

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

Solution (Python):
A, B = [int(i) for i in input().split()]
tmp1 = A + (A-1)
tmp2 = B + (B-1)
tmp3 = A + B
print(max(max(tmp1,tmp2), tmp3))

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

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

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 = [int(s) for s in input().split()]
if A < B:
    A, B = B, A
print(A + max(A-1, B))

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

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

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

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

a.sort()
we=a[1]

we2=max(we-1,a[0])
print(we+we2)

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

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

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())
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):
from sys import stdin

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

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

input = lambda: stdin.readline()
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(" "))

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

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

print(m)

Solution (Python):
A,B = [int(c) for c in input().split()]
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:
    x = A
    A -= 1
else:
    x = B
    B -= 1

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

print(x)

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

c = max([a, b])

if c == a:
    d = max([a - 1, b])
else:
    d = max([a, b - 1])

result = c + d
print(result)

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(2*A)

Solution (Python):
from sys import exit

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

if A > B:
    one = A
    A -= 1
else:
    one = B
    B -= 1

if A > B:
    two = A
else:
    two = B

print(one + two)

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

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

Solution (Python):

import sys
import math
import numpy as np
import itertools


a, b = (int(i) for i in 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())

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

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


if (b-1) > c:
    print(b+b-1)
    exit()
elif (c-1) >b:
    print(c+c-1)
    exit()

print(b+c)

Solution (Python):

import re, sys

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

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

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

Solution (Python):


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

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

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

Solution (Python):
def solve(a, b):
    r = 0
    if a == b:
        r = a + b
    else:
        t = max([a,b])
        r = t + t - 1
    print(r)

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

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


print(res)

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

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

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())
max_=max(a,b)
min_=min(a,b)
count=0
for i in range(2):
    count+=max_
    max_-=1
    max_=max(max_,min_)
    min_=min(max_,min_)
print(count)

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

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

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

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

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

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

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

c = max(a, b)
d = max(c - 1, min(a, b))

print(c + d)

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

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

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

Solution (Python):
A, B = map(int, input().split(' '))
result1 = A + B
result2 = A + (A -1 )
result3 = B + (B-1)
result = max(result1, result2, result3)
print(result)

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

"""
AtCoder A
"""

def main():
    X, Y=list(map(int,input().split()))
    coin=0
    for _ in range(2):
        if X>Y:
            coin+=X
            X-=1
        else:
            coin+=Y
            Y-=1
    print(coin)
    
if __name__ == "__main__":
    main()

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

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

x=max(a,b)
y=min(a,b)

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

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

print(sum)

Solution (Python):
A, B = [int(s) for s in input().split(" ")]
print(max(2 * A - 1, A + B, 2 * B - 1))

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

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 = [int(x) for x in input().split()]
if a == b:
    print(a + b)
else:
    o = 0
    if a > b:
        o += a
        a -= 1
        if a > b:
            o += a
        else:
            o += b
    else:
        o += b
        b -= 1
        if b > a:
            o += b
        else:
            o += a
    print(o)

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

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

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):
x, y = map(int, input().split())

sum = 0

for i in range(2):
    if x < y:
        sum += y
        y -= 1
    else:
        sum += x
        x -= 1

print(sum)

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

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


if __name__ == '__main__':
    main()

Solution (Python):



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

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

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

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

Solution (Python):
A, B = map(int, input().split())
c = 0
for _ 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())
cnt = 0
if a > b:
    cnt += a
    a-=1
else:
    cnt += b
    b -= 1
if a > b:
    cnt += a
    a -= 1
else:
    cnt +=b
    b -= 1
print(cnt)

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

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

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

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

deal_count = 2
get_coin = 0

for i in range(deal_count) :
    if (A == max([A,B])) :
        get_coin += A
        A -= 1
    else :
        get_coin += B
        B -= 1

print(get_coin)

Solution (Python):
inp = input().split()
A = int(inp[0])
B = int(inp[1])

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

print(result)

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

Solution (Python):
a,b = [int(item) for item in input().split()]
if a == b:
  print(2*a)
else:
  print(max(a,b) * 2 -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)