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

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

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

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

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

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

print(Ans)

Solution (Python):
a,b = map(int,input().split())
ans = max(a+b,a+a-1,b+b-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):
List = list(map(int, input().split()))
List.sort()
res = 0
for i in range(2):
  a= List.pop(1)
  res += a
  List.append(a-1)
  List.sort()
print(res)

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

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

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

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

Solution (Python):
import sys
A,B = map(int,input().split())
if not ( 3 <= A <= 20 and 3 <= B <= 20 ): sys.exit()

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

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

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

else:
  print(a+a-1)

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

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

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

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

def main():
    a, b = map(int, input().split())
    ans = 0
    i = 0
    while i < 2:
        if a >= b:
            ans += a
            a -= 1
        else:
            ans += b
            b -= 1
        i += 1
    print(ans)
    
if __name__ == '__main__':
    main()

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

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

if a == b:
	print(a+b)
elif a > b:
	c = a
	a = a - 1
	d = max(a,b)
	c += d 
	print(c)
elif a < b:
	c = b
	b = b - 1
	d = max(a,b)
	c += d 
	print(c)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

c = a - 1
d = b - 1

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

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

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

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

list = [(2*A-1), (A+B), (2*B-1)]

print(max(list))

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

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

X = max(A, B)

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

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


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

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

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

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

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

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

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

Solution (Python):
import sys
rm = lambda: map(int, sys.stdin.buffer.readline().split())
a, b = rm()
if a == b:
  print(a*2)
else:
  print(max(a, b)*2-1)

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

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

while counter < 2:
  if a >= b:
    coin += a
    a -= 1
  else:
    coin += b
    b -= 1
  counter += 1
print(coin)

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

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

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

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

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

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

PB =[A, B]

L_PB = max(PB)
S_PB = min(PB)

coin1 = L_PB

L_PB -= 1

if S_PB <= L_PB:
    coin2 = L_PB

else:
    coin2 = S_PB

print(coin1 + coin2)

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

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

Solution (Python):
A = sorted(list(map(int, input().split())), reverse=True)
print(A[0]*2 if A[0] == A[1] else A[0]+(A[0]-1))

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

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

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

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

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

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

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

print(c+max(a, b))

Solution (Python):
import sys
sys.setrecursionlimit(10**6)



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

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

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

Solution (Python):


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

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

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

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

count = 0
for i in range(2):
    count += max(A, B)
    if A > B:
        A -= 1
    else:
        B -= 1
print(count)

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

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

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

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

Solution (Python):


cnt = 0
l = sorted(list(map(int, input().split())), reverse=True)

cnt = cnt + l[0]

l[0] = l[0] - 1

l = sorted(l, reverse=True)

cnt = cnt + l[0]

print(cnt)

Solution (Python):
def INT():
    return int(input())

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

def LI():
    return list(map(int, input().split()))

A, B = MI()

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

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

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

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

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

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

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

main()

Solution (Python):
def mi(): return map(int,input().split())
def lmi(): return list(map(int,input().split()))
def ii(): return int(input())
def isp(): return input().split()

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

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

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

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

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

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

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

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

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

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

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

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

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

def input():
    return sys.stdin.readline().strip()

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

main()

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

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

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

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

print(num)

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) * 2 - 1 if abs(A - B) >= 2 else A + B)

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

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

    print(ans)

if __name__ == '__main__':
    solve()

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

x = 0

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

print(x)

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

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

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

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

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=[]
if A>B:
    ans.append(A)
    A-=1
else:
    ans.append(B)
    B-=1

if A>B:
    ans.append(A)
else:
    ans.append(B)
    
print(sum(ans))

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    a, b = map(int, input().split())
    arr = [a, b, a - 1, b - 1]
    arr.sort()
    print(arr[2] + arr[3])


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Solution (Python):

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

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

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

ans = 0

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

Solution (Python):
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    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__':
    solve()

Solution (Python):

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

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

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

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



COIN1= A+B
COIN2=A + A-1
COIN3=B + B-1




if COIN1>= COIN2 and COIN1 >= COIN3:
        print(COIN1)
elif COIN2 >=COIN1 and COIN2 >= COIN3:
    print(COIN2)
elif COIN3 >= COIN1 and COIN3 >=COIN2:
    print(COIN3)

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

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

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

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

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

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

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

print(sum)

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

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

x = a + (a - 1)
y = a + b
z = b + (b - 1)

w = max(x, y, z)

print(w)

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

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

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

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

ans=max(a+b,2*a-1,2*b-1)

print(ans)

Solution (Python):
N=list(map(int,input().split()))
N.append(N[0]-1)
N.append(N[1]-1)
N.sort(reverse=True)

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

Solution (Python):
a,b=map(int,input().split())
l=[a,b]
l.sort()
ans=l[1]
l[1]=l[1]-1
l.sort()
ans+=l[1]
print(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):
import math
def ip():return int(input())
def inp():return map(int,input().split())
def inpstr():return map(str,input().split())
def linp():return list(map(int,input().split()))
def linpstr():return list(map(str,input().split()))

a,b=inp()
ans=0
if a<b:a,b=b,a
ans+=a
a=a-1
if a<b:a,b=b,a
ans+=a
print(ans)

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

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

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

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

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

if '__main__' == __name__:
    resolve()

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

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

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

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

C=[A+(A-1),A+B,B+(B-1)]

print(max(C))

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

x = sorted([a, b, a - 1, b - 1], reverse=True)

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

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

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

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

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

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

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

    ans = 0
    for _ in [1, 2]:
        if (A <= B):
            ans += B
            B -= 1
        elif (A > B):
            ans += A
            A -= 1

    print(ans)


resolve()

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

Solution (Python):

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

m=max(a,b)

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

else:print(2*m-1)

Solution (Python):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

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

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

c = 0

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

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

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

Solution (Python):
def main():
  num = list(map(int,input().split()))
  flg=0
  if num[0]>num[1]:
    print(num[0]*2-1)
  elif num[1]>num[0]:
    print(num[1]*2-1)
  else:
    print(num[0]*2)
main()

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

Solution (Python):
import sys
input = sys.stdin.readline
def main():
    A, B = map(int, input().split())
    ans = 0
    for i in range(2):
        ans += max(A,B)
        B = min(A,B)
        A = ans - 1
    print(ans)

if __name__ == '__main__':
    main()

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

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

Solution (Python):

import sys
input = sys.stdin.readline
A = list(map(int, input().split()))

a =max(A)
coin =a
a -=1
A.append(a)

A.sort()
a_2 =A[1]
coin +=a_2

print(coin)

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

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

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

if B < A:
  tmp = B
  B = A
  A = tmp

cnt = B
B = B-1

if B < A:
  tmp = B
  B = A
  A = tmp

print(cnt+B)

Solution (Python):
import re
n = input()
m = re.search('(\d+)\s(\d+)', n)
a = int(m.group(1))
b = int(m.group(2))
i = 0
if a < b:
    i += b
    b -= 1
    if a < b:
        i += b
        print(i)
    else:
        i += a
        print(i)
else:
    i += a
    a -= 1
    if a < b:
        i += b
        print(i)
    else:
        i += a
        print(i)

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

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

Solution (Python):
n=list(map(int,input().split()))
if n[0]==n[1]:
    print(n[0]*2)
else:
    print(max(n)*2-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())
button = 0
for _ in range(2):
  if A > B:
    button += A
    A -= 1
  else:
    button += B
    B -= 1
print(button)

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

print(ans)

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

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

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

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

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

print(ans)

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


if abs(a - b) > 0:
    m = max(a, b)
    ans = m + m - 1
else:
    ans = a + b

print(ans)

Solution (Python):

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


coins = 0
for n 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())
if A == B:
    print(A*2)
else:
    a = max(A, B)
    print(a + (a-1))

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

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

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

ans = 0
for _ in range(2):
  p = data.index( max(data) )
  ans += data[p]
  data[p] -= 1

print(ans)

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

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

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

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

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

print(ans)

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

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

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