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

Solution (Python):
import math

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

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

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

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

print(ans)

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

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

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

print(ma + max(ma - 1, mi))

Solution (Python):

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

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

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
for _ in range(2):
    tmp = max(A,B)
    if A == tmp:
        A -= 1
    else:
        B -= 1
    res += tmp

print(res)

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

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

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

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

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

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

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

Solution (Python):
(a, b) = map(int, input().split())
buttons = [a, b]
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())
Seq = [A,A-1,B,B-1]
Seq.sort()
print(sum(Seq[2:]))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

x = max(a, b)
y = min(a, b)
z = max(x-1, y)

print(x + z)

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

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

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())
a = A+B
b = 2*A-1
c = 2*B-1
E = []
E.append(a)
E.append(b)
E.append(c)
print(max(E))

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

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

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

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

ans=0
for _ in range(2):
    if i[0]>i[1]:
        ans += i[0]
        i[0] -= 1
    elif i[1]>=i[0]:
        ans += i[1]
        i[1] -= 1 
print(ans)

Solution (Python):

import math
import datetime





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

list = []
list.append(A)
list.append(B)
list.sort()

x = list[1]
list[1] -= 1
list.sort()
x += list[1]

print (x)

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

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

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

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

print(ans)

Solution (Python):

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


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


def solve():
    return


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


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
input = sys.stdin.readline
def print_ans(A, B):
    """Test Case
    >>> print_ans(5, 3)
    9
    >>> print_ans(3, 4)
    7
    >>> print_ans(6, 6)
    12
    """
    ans = sorted([A, B, A - 1, B - 1])
    print(ans[-1] + ans[-2])

if __name__ == '__main__':
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)

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

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

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

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

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

Solution (Python):

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

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

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

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

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

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

OnlyA = A+(A-1)

OnlyB = B+(B-1)

AaddB = A + B

print(max([OnlyA,OnlyB,AaddB]))

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

Solution (Python):
A,B=map(int,input().split(' '))
ans=0
def button(A,B,ans):
  if A>B:
    ans+=A
    A-=1
  else:
    ans+=B
    B-=1
  return A,B,ans

A,B,ans=button(A,B,ans)
A,B,ans=button(A,B,ans)
print(ans)

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

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

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

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

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

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

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

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

if lar-sma >= 2:
    print(lar*2-1)
else:
    print(lar+sma)

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
def input():
    return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

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

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

data.sort()

if data[1] - data[0] >=1:
    ans = data[1]*2 - 1
elif data[1] == data[0]:
    ans = data[1]*2
else:
    ans = sum(data) - 1
        
print(ans)

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

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

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

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


max = max(data[0]+data[0]-1, data[0]+data[1], data[1]+data[1]-1)

print(max)

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

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

Solution (Python):
a, b = map(int, input().split())
num1 = max(a, b)
num2 = min(a, b)
ans = num1

if num1-1 > num2:
  ans += num1-1
else:
  ans += num2
  
print(ans)

Solution (Python):

import sys










def main():
    a, b = [int(x) for x in sys.stdin.readline().split()]
    if a == b:
        ans = a + b
    elif a > b:
        ans = a + (a - 1)
    elif b > a:
        ans = b + (b - 1)
    
    print(ans)



if __name__ == "__main__":
    main()

Solution (Python):


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

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

if __name__ == "__main__":
    main()

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

after_1p = max(a, b) - 1


ans = max(a, b) + max(min(a, b), after_1p)

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

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

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

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())
lower, greater = sorted([a, b])

if greater-lower >= 2:
    print(greater+(greater-1))
else:
    print(greater+lower)

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

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

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

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

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

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

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

if a<b:
  a,b=b,a

ret = a+max([a-1,b])

print(ret)

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

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

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

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

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

Solution (Python):
c = list(map(int, input().split()))
c.sort()
ans = c.pop()
c.append(ans-1)
c.sort()
ans += c.pop()
print(ans)

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

Solution (Python):
a = list(map(int, input().split()))
a.sort()
print(max(a[0], a[1])+max(a[0], a[1]-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):
def chooseBig(x, y):
    if x > y:
        return x, x - 1, y
    else:
        return y, x, y - 1

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

sum1, A, B = chooseBig(A, B)
sum2, A, B = chooseBig(A, B)
print(sum1 + sum2)

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

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

m1 = max(ab)
ab[ab.index(m1)] = m1 - 1
m2 = max(ab)

print(m1 + m2)

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

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

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

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

Solution (Python):
from sys import stdin
import bisect

a,b = [int(x) for x in stdin.readline().rstrip().split()]

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

print(point)

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

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

print(ans)

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

lists = sorted([a, a-1, b, b-1])
print(lists[2] + lists[3])

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

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

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

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

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

Solution (Python):


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

if __name__ == "__main__":
    main()

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


if __name__ == '__main__':
    main()

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

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

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

print(max(sum(l),max(l)*2-1))

Solution (Python):
buttons = list(map(int,input().split()))
ans=0
for i in range(2):
  buttons.sort()
  ans+=buttons[-1]
  buttons[-1]-=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())
print(max(A+(A-1),A+B,B+(B-1)))

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

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

ans=0

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

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

Solution (Python):


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

if __name__ == "__main__":
    main()

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

X = [A,B,A-1,B-1]

X = sorted(X)
print(X[-1] + X[-2])

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

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

Solution (Python):
A, B = [int(x) for x in input().split()]
print(sum(sorted([A, B, A-1, B-1])[-2:]))

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

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

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

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

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

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

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

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

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

print(ans)

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

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

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

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    if a == b:
        print(a + b)
    elif a > b:
        print(a + (a - 1))
    elif a < b:
        print(b + (b - 1))


if __name__ == '__main__':
    slove()

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

lista=[]

lista.append(b)
lista.append(b-1)
lista.append(a)
lista.append(a-1)

lista.sort()

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

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

sum = 0
if(A < B):
	sum += B
	B-=1
else:
	sum += A
	A-=1
    
if(A < B):
	sum += B
	B-=1
else:
	sum += A
	A-=1

print (sum)

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

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

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

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

n.sort()
coin = 0

for i in range(0, 2) :
    coin += n[1]
    n[1] -= 1
    n.sort()

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

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

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

gain = 0

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

print(gain)

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

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

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

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

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

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

Solution (Python):
INPUT = list(map(int,input().split()))
A=int(INPUT[0])
B=int(INPUT[1])
coin=0

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

Solution (Python):
A,B = map(int,input().split())
target = list(range(1,A+1))
target.extend(list(range(1,B+1)))

target.sort(reverse=True)
print(target[0]+target[1])

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

Solution (Python):
'''A - Buttons
https://atcoder.jp/contests/abc124/tasks/abc124_a

>>> main(5,3)
9
>>> main(3,4)
7
>>> main(6,6)
12'''


def main(a, b):
    _max = max(a, b)
    _min = min(a, b)
    amount = 0

    amount += _max
    _max -= 1

    if _max > _min:
        amount += _max
    else:
        amount += _min

    print(amount)


if __name__ == "__main__":
    a, b = map(int, input().split(' '))

    main(a, b)

Solution (Python):
a, b = (int(x) for x in input().split())
if a > b:
    c = b
    b = a
    a = c
if b - a >= 1: print(2*b - 1)
elif b == a: print(2 * a)

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

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

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

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

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

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

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

print(total)

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

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

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

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

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)