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())
m = max(a,b)
m1 = m*2-1
m2 = a+b
ans = max(m1,m2)
print(ans)

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

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

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

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

Solution (Python):
a, b = (int(i) for i in 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 = list(map(int, input().split()))
m = 0
if A < B:
    m = m + B
    B = B -1
else:
    m = m + A
    A = A - 1

if A < B:
    m = m + B
    B = B -1
else:
    m = m + A
    A = A - 1

print(m)

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

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

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

Solution (Python):
a, b = map(int, input().split())
numlist = [a, b, a-1, b-1]
numlist.sort()
ans = numlist[2]+numlist[3]
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):

import sys
import math
from collections import defaultdict


sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]


mod = 10**9 + 7


def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))



A,B = II()

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

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

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

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

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

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

print(sum1)

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

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());print(max(a,b)*2-(a!=b))

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

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

Solution (Python):
import math

inputa = input().split()




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







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

Solution (Python):
def test():
    a = list(map(int,input().split()))
    count = 0

    for i in range(2):
        count += max(a)
        b = a.index(max(a))
        a[b] = max(a) - 1

    print(count)


if __name__ == "__main__":
    test()

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

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

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

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

Solution (Python):
a, b = list(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):
def solve():
    a, b = map(int, input().split())
    ans = 0
    for i in range(2):
        ans += max(a, b)
        if a == max(a, b):
            a -= 1
        else:
            b -= 1
    return ans


if __name__ == "__main__":
    print(solve())

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

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

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

cnt = 0
if a > b:
    cnt = a
    a = a - 1
else:
    cnt = b
    b = b - 1

cnt += max(a, b)

print(cnt)

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

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

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

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

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

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

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

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

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

coins = 0

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

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

print(coins)

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 = [int(i) for i in input().split()]
c = max(a,b)
print(c+c-1 + (1 if a == b else 0))

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

if temp[0]-temp[1]!=0:
  print(max(temp)*2-1)
else:
  print(max(temp)*2)

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

sum = 0
for _ 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())

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

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

if a == b:
  print(a+b)

elif a < b:
  print(b+b-1)
  
elif a > b:
  print(a+a-1)

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

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

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

m=sorted(n,reverse=True)

tmp=0

tmp+=m[0]

m[0]-=1

print(tmp+max(m))

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

for i in range(0,2):
    if A >= B:
        C += A
        A -= 1
    elif A < B:
        C += B
        B -= 1
print(C)

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

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

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

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

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

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

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

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

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

Solution (Python):



result = 0
AB = list(map(int, input().split()))





sorted_list = sorted(AB, reverse=True)



result += sorted_list[0]

if sorted_list[0] - 1 > sorted_list[1]:
    result += sorted_list[0] - 1
else:
    result += sorted_list[1]
    
print(result)

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

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

A = int(N[0])
B = int(N[1])
T = 0

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

print(T)

Solution (Python):
def solve(string):
    a, b = map(int, string.split())
    return str(max(2 * a - 1, a + b, 2 * b - 1))


if __name__ == '__main__':
    print(solve(input()))

Solution (Python):
a, b = map(int, input().split())
c, d = a-1, b-1

num = list(sorted([a, b, c, d]))

print(num[-1] + num[-2])

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

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

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

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

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

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

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

result = 0
coin = 0

for i in range(2):
  coin = max(button)
  result += coin
  button[button.index(coin)] -= 1
  
  
print("{:d}".format(result))

Solution (Python):

import sys

def get_numbers():
    return map(int, input().split())

a, b = get_numbers()

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

Solution (Python):

a, b = [int(x) for x in input().split()]
if a > b:
    print(a * 2 - 1)
elif a < b:
    print(b * 2 - 1)
else:
    print(a * 2)

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

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

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

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

if n>m:
  sum += n
  n=n-1
else :
  sum += m
  m=m-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
else:
    ans += b

print(ans)

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

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

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

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

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

import numpy as np

res=0

for i in range(2):
	k=np.argmax(x)
	res+=x[k]
	x[k]-=1

print(res)

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):
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''

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

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

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

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

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

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());print(max(a,b)*2-(a!=b))

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

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

if A > B:
    ans = 2 * A - 1
elif A == B:
    ans = 2 * A

print(ans)

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

if A > B:
    ans = 2 * A - 1
elif A == B:
    ans = 2 * A

print(ans)

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


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

ans = 0
ans += ma
ma -= 1
ans += max(ma,mi)

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

Solution (Python):
a, b = list(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):
list = [int(i) for i in input().split(" ")]
a = max(list)
b = min(list)

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

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

but=list(map(int,input().split()))
but = sorted(but)
res = but[-1]
but[-1] -= 1
but = sorted(but)
res += but[-1]
print(res)

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

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

s = max(ab)
if a > b:
    s = s + a-1
elif a < b:
    s = s + b-1
else:
    s = 2*s

print(s)

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

Solution (Python):
A,B = (int(x) for x 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, input().split())
print(max(2*A-1, 2*B-1, 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())
print(max(A,B)+max((max(A,B)-1),min(A,B)))

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 = map(int, input().split())
result = []

result.append(a + (a-1))
result.append(a + b)
result.append(b + (b-1))

print(max(result))

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

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

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

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

print(cnt)

Solution (Python):
a, b = map(int, input().split())
hako = [a, a - 1, b, b - 1]
hako.sort(reverse=True)
hako = hako[:2]
print(sum(hako))

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

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

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

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())
A2 = A+(A-1)
B2 = B+(B-1)
AB = A+B

print(max(A2,B2,AB))

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

Solution (Python):
"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    a,b = map(int, sys.stdin.readline().split())
    if a==b:
        print(a+b)
    else:
        n=max(a,b)
        m=min(a,b)
        if n > m+1:
            print(2*n-1)
        else:
            print(a+b)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import heapq
a, b = map(int, input().split())
print(sum(heapq.nlargest(2, [a, a-1, b, b-1])))

Solution (Python):

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

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

Solution (Python):




def main():
    a, b = map(int, input().split())

    ans = list()
    ans.append(a + b)
    ans.append(a + a - 1)
    ans.append(b + b - 1)

    print(max(ans))


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

score = 0

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

print(score)

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

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

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

Solution (Python):
num = input().split()
a, b = int(num[0]),int(num[1])

max_tmp = 0
max_tmp += max(a,b)
if a==max(a,b): a-= 1
else: b-=1
  
max_tmp += max(a,b)

print(max_tmp)

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

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

Solution (Python):
import sys
import math
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [a, b] = string_to_int(inputs[0])

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

    return ret


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

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

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

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

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

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

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

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())
lst = [A+A-1, A+B, B+B-1]
lst.sort()
print(lst[-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
    a -= 1
else:

    sum += b
    b -= 1

print(sum)

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

Solution (Python):



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


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

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

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

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

Solution (Python):

x = [int(n) for n in input().split()]
if x[0] > x[1]:
    print(x[0]*2 - 1)
elif x[0] == x[1]:
    print(x[0]*2)
else:
    print(x[1]*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):
sum = 0
A, B  = input().split(" ")
if A != int() and B != int():
    A = int(A)
    B = int(B)
    for i in range(2):
        if A > B:
            sum += A
            A -= 1
        elif B > A:
            sum += B
            B -= 1
        elif A==B:
            sum += A
            A -= 1
    print(sum)

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

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

Solution (Python):
import sys
from collections import deque  
from collections import defaultdict  
from heapq import heapify, heappush, heappop, heappushpop  
from bisect import bisect_left, bisect_right  



s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2sss = lambda n: [list(sys.stdin.readline().rstrip()) for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))
MOD = int(1e+9) + 7

def main():
    A, B = i2nn()
    if A == B:
        print(A + B)
    elif A > B:
        print(A + A - 1)
    else:
        print(B + B - 1)

main()

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

Solution (Python):


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

if A > B:
    ans = A*2 - 1
elif A == B:
    ans = A*2
else:
    ans = B*2 - 1

print(ans)