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 itertools

a, b = map(int, input().rstrip().split())
l = [a, b, a-1, b-1]
comb = list(itertools.combinations(l, 2))
sum_comb = list(map(sum, comb))
out = max(sum_comb)
print(out)

Solution (Python):

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

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

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

Solution (Python):
a=list(map(int,input().split()))
count=0
A=max(a)
count+=max(a)
a[a.index(max(a))]-=1
count+=max(a)
print(count)

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

a, b = stdin.readline().rstrip().split()

a = int(a)
b = int(b)

sum = 0

sum += max(a, b)

if sum == a:
    a -= 1
else:
    b -= 1

sum += max(a, b)

print(sum)

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

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

Solution (Python):
inputs = [int(i) for i in input().split()]
res = 0
res += max(inputs)
max_idx = inputs.index(max(inputs))
inputs[max_idx] -= 1
res += max(inputs)
print (res)

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

if a - b == 0:
    sum = a+b
elif a+1 > b:
    sum = a+(a-1)
elif a - b == 1 or b - a == 1:
    sum = a+b
else:
    sum = b+(b-1)

print(sum)

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

if B>A:
    A,B=B,A

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

Solution (Python):
button = input().split()
button_1 = int(button[0]) 
button_2 = int(button[1]) 

counter = 0

if button_1>=button_2:
  counter=button_1
  button_1-=1
else:
  counter=button_2
  button_2-=1


if button_1>=button_2:
  counter+=button_1
  button_1-=1
else:
  counter+=button_2
  button_2-=1

print(counter)

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

Solution (Python):
A, B = sorted([int(_) for _ in input().split()])
if A == B:
    print(A + B)
else:
    print(2 * B - 1)

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

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

print(sum)

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

Solution (Python):
from sys import stdin
import math
import itertools
import copy


def makeIntMatrix(lines):
    intMatrix = []
    for a in makeStringMatrix(lines):
        intMatrix.append([int(b) for b in a])
    return intMatrix
 
 
def makeStringMatrix(lines):
    stringMatrix = [line.split() for line in lines]
    return stringMatrix
 
 
def makeInt(line):
    return int(line.rstrip())
 
 
def makeMultiInteger(line):
    return [int(x) for x in line.rstrip().split()]


def solve(input_string):
    a = makeMultiInteger(input_string[0])
    _max = 0
    two = copy.deepcopy(a)
    c = two[0]
    two[0] -= 1
    c += two[0]
    two[0] -= 1
    if _max < c:
        _max = c

    two = copy.deepcopy(a)
    c = 0
    c = two[0]
    two[0] -= 1
    c += two[1]
    two[1] -= 1
    if _max < c:
        _max = c

    two = copy.deepcopy(a)
    c = 0
    c = two[1]
    two[1] -= 1
    c += two[1]
    two[1] -= 1
    if _max < c:
        _max = c
    return _max


def main():
    input_lines = stdin.readlines()
    answer = solve(input_lines)
    print(answer)


if __name__ == '__main__':
    main()

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

Solution (Python):
import numpy as np

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

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

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

total = 0

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

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

print(total)

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

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


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

ans = 0

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

print(ans)

Solution (Python):
a, b = map(int, input().split())
max1 = max(a, b)
if a == max1:
    a -= 1
elif b == max1:
    b -= 1
max2 = max(a, b)

print(max1 + max2)

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


sa=n[0]-n[1]
saa=abs(sa)

if saa>=2:
  tokuten=iti*2-1
else:
  tokuten=sum(n)


print(tokuten)

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

Solution (Python):
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
if(a>b): print(a*2-1)
elif(a<b): print(b*2-1)
elif(a==b):print(a*2)

print()

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

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

total = 0

if(A == B):
  print(A + A)
elif(A > B):
  total = total + A
  A = A - 1
  if(A >= B):
    total = total + A
    print(total)
  elif(B > A):
    total = total + B
    print(total)
elif(A < B):
  total = total + B
  B = B - 1
  if(A <= B):
    total = total + B
    print(total)
  elif(B < A):
    total = total + A
    print(total)

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

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

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

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

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

int(A)
int(B)
sum = 0

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

print(sum)

Solution (Python):
def split_returner(chardata):
        chardata = str(chardata).split(" ")
        for i in range(0,len(chardata)):
            chardata[i] = int(chardata[i])
        return chardata

ab = split_returner(str(input()))
result = 0
for i in range(0,2):
    if ab[0] > ab[1]:
        result+= ab[0]
        ab[0] = ab[0] -1
    else:
        result += ab[1]
        ab[1] = ab[1] - 1
print(result)

Solution (Python):
import sys

def ii2ss(n):
    return [sys.stdin.readline() for _ in range(n)]

def sp2nn(sp, sep=' '):
    return [int(s) for s in sp.split(sep)]

def ss2nn(ss):
    return [int(s) for s in list(ss)]

def main(ss):
    a, b = sp2nn(ss[0])
    if a > b:
        print(a + (a-1))
    elif a < b:
        print(b + (b-1))
    else:
        print(a + b)

main(ii2ss(1))

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

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

pattern1 = A+A-1
pattern2 = A+B
pattern3 = B+B-1

print(max(pattern1, pattern2, pattern3))

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

Solution (Python):
a, b = [int(item) for item in 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):

"""
Created on Sat Apr 13 20:00:11 2019

@author: screamLab
"""

a,b = input().split(' ')
a = int(a)
b= int(b)
s = [a+b,a-1+a,b-1+b]
    
print(max(s))

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

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

Solution (Python):
a, b = map(int, input().split())
if a==b:
    print(a*2)
else:
    maxx = max(a, b)
    print(maxx + (maxx - 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 = (int(i) for i in input().split())
result = 0
cnt = 0
while(cnt < 2):
    if A < B:
        result += B
        B = B - 1
    elif A > B:
        result += A
        A = A - 1
    else:
        result += A
    cnt += 1
    
print(result)

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

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

if A>=B:
    second = A
else:
    second = B

print(first+second)

Solution (Python):

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

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

print(max(aa, ab, bb))

Solution (Python):
num = input()
num_list = num.split()
a = int(num_list[0])
b = int(num_list[1])
_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())

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

Solution (Python):

list = list(map(int,input().split(" ")))
if(list[0]>list[1]):
    max= max(list[0]+list[1],list[0]+(list[0]-1))
    print(max)
else :
    max = max(list[0] + list[1], list[1] + (list[1] - 1))
    print(max)

Solution (Python):


if __name__ == "__main__":
    A, B = map(int, input().split())
    total = 0
    for n in range(2):
        if A < B:
            total += B
            B = B - 1
        else:
            total += A
            A = A - 1
    
    print(total)

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

Solution (Python):
from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().split()]

res = 0

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

print(res)

Solution (Python):
a,b=[int(i) for i in input().split()]
if a==b : print(2*a)
else :
  if a<b : a,b = b,a
  print(2*a-1)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
a, b = tuple(map(int, input().rstrip().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())

ans = 0

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

print(ans)

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

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

ans = 0
ans_list = []

ans_list.append(2 * buttons[0] - 1)
ans_list.append(2 * buttons[1] - 1)
ans_list.append(buttons[0] + buttons[1])
print(max(ans_list))

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

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

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

Solution (Python):
a,b = (int(x) for x in input().split())
c = [0]*4
c[0] = 2*a-1
c[1] = a + b
c[2] = 2*b -1
print(max(c))

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

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

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

Solution (Python):
a, b = map(int, input().strip().split(' '))
l = [a,b]
l.sort(reverse=True)
if l[0]-1>l[1]:
    print(l[0]+l[0]-1)
else:
    print(l[0]+l[1])

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

x += max(a,b)

print(x)

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

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

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

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

Solution (Python):
a, b = (int(i) for i in input().split())
point = 0
if a > b:
  point += a
  a -= 1
else:
  point += b
  b -= 1
  
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:
  N=A*2
  
elif A>B:
  N=A*2-1
  
else:
  N=B*2-1
  
print(N)

Solution (Python):
l = [int(x) for x in input().split()]
l.sort()
print(l[1]*2-1 if l[1]-1 >= l[0] else l[0]+l[1])

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

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

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

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

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

def solve(A,B):
    return max([2*A-1,2*B-1,A+B])



if __name__ == "__main__":
    A,B = get_input()
    ans = solve(A,B)
    print(ans)

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

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

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

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

if (A > B) and ((A-1) >= B):
  ans_sum += A
  ans_sum += A-1
elif (B > A) and ((B-1) >= A):
  ans_sum += B
  ans_sum += B-1
elif A == B:
  ans_sum += A
  ans_sum += B
print(ans_sum)

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

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

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

a1 = a -1
b1 = b -1
sum = 0
if a1 > b1:
    sum = a + a1
elif a1 < b1:
    sum = b + b1
else:
    sum = a + b
print(sum)

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

n.sort()
if n[0] == n[1]:
    print(n[0] + n[1])
else:
    print(n[1]*2-1)

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

print(n)

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

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

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

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

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

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

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

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

def calc(a, b):
    if (abs(a - b) == 0) | (abs(a - b) == 1):
        return a + b
    else:
        if a > b:
            return a + (a - 1)
        else:
            return b + (b - 1)

print(calc(a, b))

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

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

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

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

if a > b:
  print(out + a)
else:
  print(out + b)

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

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

elif A == B + 1 or A == B:
    print(A + B)

else:
    print(B + B - 1)

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

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

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

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

Solution (Python):

import sys
import math


def solve(A: int, B: int):
    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)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):
d1 = list(map(int, input().split()))
answer = 0
d1 = sorted(d1)
answer += d1[1]
d1[1] -= 1
if d1[1] < d1[0]:
    answer += d1[0]
else:
    answer += d1[1]
print(answer)

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

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

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

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


if __name__ == '__main__':
    main()

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

if A==B:
    num = A+B
elif A<B:
    num = B+(B-1)
else:
    num = A+(A-1)

print(num)

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

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


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


A, B = read_ints()

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

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

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

ans = 0
count = 0
for i in range(2):
    count = max(A,B)
    if A == B:
        A -= 1
    elif A == count and A!= B:
        A -= 1
    elif B == count and A != B:
        B -= 1
    ans += count

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

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

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

print(count)

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

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

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

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

a2=a*2-1
b2=b*2-1
ab=a+b

answers=[ab,a2,b2]
print(max(answers))

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

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

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

print(ans)

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

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

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

Solution (Python):
A, B = map(int, input().split())
sum = 0
if A < B:
    sum += B
    a = B - 1
    flag = True
else:
    sum += A
    a = A - 1
    flag = False

if flag:
    b = max(a, A)
    print(sum + b)
else:
    b = max(a, B)
    print(sum + b)

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

count = 0
i = 0
while i < 2:
    if A > B:
        count += A
        A -= 1
    else:
        count += B
        B -= 1
    i += 1

print count

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

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

ans = 0

if (A > B):
  ans = A + (A-1)
elif (A < B):
  ans = B + (B-1)
else:
  ans = A + B

print(ans)

Solution (Python):
n = list(map(int,(input().strip().split(' '))))
a = n[0]
b = n[1]
t = 0
if a > b:
    t += a
    a -= 1
else:
    t += b
    b -= 1

if a > b:
    t += a
    a -= 1
else:
    t += b
    a -= 1

print(t)

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

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

print(coin)

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

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

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

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

x = 0
if a > b: x = a*2 - 1
elif a == b: x = a*2
else: x = b*2 - 1

print(x)

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

print(s)

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

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

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

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

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

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

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

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

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

Solution (Python):
import numpy as np

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

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

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

Solution (Python):
a, b = map(int, input().split())
ans = []
for i in range(2):
    x = max(a, b)
    if x == a:
        a -= 1
    elif x == b:
        b -= 1
    ans += [x]
print(sum(ans))

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

s = 0
for i in [0,1]:
    if a > b:
        s = s + a
        a = a - 1
    else:
        s = s + b
        b = b - 1
print(s)

Solution (Python):
def main():
    l = list(map(int, input().split()))
    if max(l) != min(l):
        print((max(l) * 2) - 1)
    else:
        print(max(l) * 2)
    

if __name__ == "__main__":
  main()

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

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

Solution (Python):
import sys

def main(inp):
    a,b=map(int,next(inp).split())
    if(a!=b): return 2*max(a,b)-1
    else: return a+b
    
print(main(sys.stdin))

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

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

coin = max(a, b)

if a < b:
  b -= 1
elif a > b:
  a -= 1

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

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

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

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

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

print(s)

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