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


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    

    
    a, b = mi()
    ans = 0

    def push():
        nonlocal a, b, ans
        if a > b:
            ans += a
            a -= 1
        else:
            ans += b
            b -= 1
    push()
    push()

    print(ans)


if __name__ == "__main__":
    main()

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

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


if __name__ == "__main__":
    main()

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

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

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

point = 0

button =np.array([a,b])

point += np.max(button)
index = np.argmax(button)

button[index]-=1

point += np.max(button)

print(point)

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

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

if __name__ == '__main__':
    main()

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






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


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





A,B = inputIL()

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

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

Solution (Python):
import sys
import math
import bisect

def main():
    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)
    
if __name__ == "__main__":
    main()

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

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

large = max(A, B)
small = min(A, B)

total = large
large -= 1
total += max(large, small)

print(total)

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

Solution (Python):
A, B = map(int, input().split())
ans = 0
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):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


a, b = Is()
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):
def q1():
    A, B = (int(i) for i in input().split())

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


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

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

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

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


if __name__ == '__main__':

    ABC_124_A()

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

Solution (Python):
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right


from functools import reduce
from pprint import pprint

INF = float("inf")

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

def mylistinput(n):
    return [ list(myinput()) for _ in range(n) ]

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

a,b = myinput()
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
if A > B:
    ans += A + max(A-1, B)
else:
    ans += B + max(A, B-1)

print(ans)

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

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):
x = list(map(int, input().split()))
if x[0] == x[1]:
    print(x[0]+x[1])
elif x[0] > x[1]:
    print(x[0]+(x[0]-1))
elif x[0] < x[1]:
    print(x[1]+(x[1]-1))

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

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

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

Solution (Python):
a,b = map(int,input().split())
ans = 0
x = 0
while(x<2):
  if a<b:
    ans+=b
    b-=1
  else:
    ans+=a
    a-=1
  x+=1
print(ans)

Solution (Python):

if __name__ == "__main__":
    A, B = [int(a) for a in input().split()]
    cnt = 0
    for i in range(2):
        if A >= B:
            cnt += A
            A -= 1
        else:
            cnt += B
            B -= 1
    print(cnt)

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

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

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

Solution (Python):
import itertools
import math
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())
print(max(A+A-1,A+B,B+B-1))

Solution (Python):

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

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

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

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

Solution (Python):
a, b = map(int, input().split())
ans = 0
for _ in '__':
    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-1)
elif a==b:
    print(a*2)
else:
    print(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:
	print(a*2)
else:
	print(max(a,b)*2-1)

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

Solution (Python):



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

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

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

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

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

Solution (Python):


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

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

Solution (Python):
ab = list(map(int,input().split()))
ab2 = sorted(ab)
coin = ab2[1]
ab2[1] = ab2[1]-1
ab3 = sorted(ab2)
coin += ab3[1]
print(coin)

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

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

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

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

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

_l = list([a+a-1, b+b-1, a+b])

ans = max(_l)

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

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

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

Solution (Python):
def buttons(a, b):

    return max(a, b) + max(max(a, b)-1,min(a, b))
def main():
    a, b = map(int, input().split())
    print(buttons(a, b))

if __name__ == '__main__':
    main()

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

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

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

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

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

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

print(ans)

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

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

Solution (Python):
import sys
import math
from collections import Counter
import itertools



def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")



a,b=MI()

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

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

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

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

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

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

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

if x - 2 >= y:
  print(x + x - 1)
else:
  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())

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

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

n = 2
total = 0
while n > 0:
  if a > b:
    total=total+a
    a-=1
  else:
    total=total+b
    b-=1
  n-=1
print(total)

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

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


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

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

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

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

aa = a+a-1
bb = b+b-1
ab = a+b

lists = [aa,bb,ab]
print(max(lists))

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

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

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:
    x, y = y, x
m = x
x -= 1
print(m + max(x, y))

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

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

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

Solution (Python):


import sys
import math
import collections
import itertools
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def lcm(x, y) : return (x * y) // math.gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")
def YesNo(B) : print("Yes" if B else "No")
def YESNO(B) : print("YES" if B else "NO")

A, B = LI()

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

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

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

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

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

print(coins)

Solution (Python):
def main():
    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)
if __name__ == "__main__":
    main()

Solution (Python):
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = il()
    ret = max(A, B)
    if ret == A:
        ret += max(A - 1, B)
    else:
        ret += max(A, B - 1)
    print(ret)


if __name__ == '__main__':
    main()

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

print(total)

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

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

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

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

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

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


if __name__ == '__main__':
    main()

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

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

print(ans)

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

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

Solution (Python):
def resolve():
    a,b=map(int, input().split())
    ans=0
    if a >= b:
        ans+= a
        a = a-1
        if a >= b:
            ans+= a

        elif b > a:
            ans+= b

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

        elif b>a:
            ans+= b
    print(ans)
resolve()

Solution (Python):
A, B = map(int, 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 >= 2:
  print(2 * A - 1)
elif B - A >= 2:
  print(2 * B - 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())
l=[a,a-1,b,b-1]
l.sort()
print(l[2]+l[3])

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):
import sys
readline = sys.stdin.readline

def main():
    A, B = map(int, readline().rstrip().split())
    print(max(A, B) + max(max(A, B) - 1, min(A, B)))


if __name__ == '__main__':
    main()

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

Solution (Python):

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

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

print(cnt)

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

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

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

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

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

total = max(
    A + A - 1,
    B + B - 1,
    A + B,
)

print(total)

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

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

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

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

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

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

print(x)

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):
Number= list(map(int, input().split()))
Number.sort()
if Number[0] == Number[1]:
    print(sum(Number))
else:
    print(Number[1]*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())
x = int(2*a-1)
y = int(a+b)
z = int(2*b-1)
l = []
l.append(x)
l.append(y)
l.append(z)
print(max(l))

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

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

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()
if A == B:
    answer = A + B
else:
    C = max(A, B)
    answer = C + C - 1

print(answer)