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):
s = input().split()
t = int(s[0])
k = int(s[1])
li = []
li.append(k)
li.append(t)
li.sort()
n = li.pop(1)
li.append(n - 1)
li.sort()
n += int(li[1])
print(n)

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

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

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

elif A == B :
    s = A + A

else:
    s = B + B - 1

print(s)

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

Solution (Python):
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

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

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

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

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

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

Solution (Python):
A, B = list(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):
def main():
	buttons = list(map(int, input().split()))
	aa = buttons[0] + (buttons[0] - 1)
	ab = buttons[0] + buttons[1]
	bb = buttons[1] + (buttons[1] - 1)
	print(max(aa, ab, bb))

main()

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

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

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

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

coin = 0

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

Solution (Python):
A, B = map(int, input().split())
ans = 0
for i in range(2):

  if A > 3 and A >= B:
    ans += A
    A -= 1
    continue

  if B > 3 and B > A:
    ans += B
    B -= 1
    continue
  
  if A == 3 and B == 3:
    ans += A

print(ans)

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

sum1=a+a-1
sum2=a+b
sum3=b+b-1

if sum1<sum2:
    if sum3<sum2:
        ans=sum2
    else:
        ans=sum3
else:
    if sum1>=sum3:
        ans=sum1

print(ans)

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

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B):
    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

    return ans


def main():
    A, B = read_int_n()
    print(slv(A, B))


if __name__ == '__main__':
    main()

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

b = a.index(max(a))

a[b] = a[b] - 1

output = output + max(a)

print(output)

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

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

Solution (Python):
A, B = [int(x) for x in input().split()]
ans = 0
if A > B: print(2*A-1)
elif A < B: print(2*B-1)
else: print(A+B)

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

Solution (Python):


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

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

Solution (Python):

A, B = map(int, input().split())
C = 0
if (A < 3) or (B > 20) or (isinstance(A, int) != True) or (isinstance(B, int) != True):
    exit()
for i in range(2):
    if A > B:
        C += A
        A -= 1
        i += 1
    else:
        C += B
        B -= 1
        i += 1
print(C)

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

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

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

A = int(A)
B = int(B)

if A > B :
    X = A
    A = A - 1

else :
    X = B
    B = B - 1

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

print(X)

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

ret = x
x -= 1
ret += max(x, y)
print(ret)

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

x = 0

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

print(x)

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

for _ in [0,1]:
    if a > b:
        s += a
        a -= 1
    else:
        s += b
        b -= 1

print(s)

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

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

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

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

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

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

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

print(ans)

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

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):


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

print(answer+max((a,b)))

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

Solution (Python):


import sys
import copy

input = sys.stdin.readline



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

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

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

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

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

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

Solution (Python):
import copy

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

coins = 0
for i in range(2):
    if A > B:
        vmax = copy.copy(A)
        A -= 1
    else:
        vmax = copy.copy(B)
        B -= 1
    coins += vmax
print(coins)

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

if a == b:
    coin = a*2
else:
    if a > b:
        coin = a*2-1
    else:
        coin = b*2-1

print (coin)

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

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

if i[0] == i[1]:
    num = i[0]*2
else:
    max = max([i[0], i[1]])
    num = max + max-1

print(num)

Solution (Python):
a = input()

inp = a.split()

inp = [int(i) for i in inp]


point  = 0

for i in range(2):
	maxinp = 0
	maxind = 0
	for index, s in enumerate(inp):
		if maxinp < s:
			maxinp = s
			maxind = index
	
	point += maxinp
	inp[maxind] = maxinp - 1

print(point)

Solution (Python):
from sys import stdin

A, B = stdin.readline().rstrip().split()
A, B = int(A), int(B)

first = 2 * A - 1
second = A + B
third = 2 * B - 1

max = max(first, second, third)
print(max)

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

Solution (Python):


import re

a = input()
a = re.split(" ",a)
c = []
b = max(int(a[0]), int(a[1]))
if(b == int(a[0])):
    c.append(int(a[0])-1)
    c.append(int(a[1]))
if(b == int(a[1])):
    c.append(int(a[1])-1)
    c.append(int(a[0]))

d = max(int(c[0]),int(c[1]))
ans = b + d
print(ans)

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

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

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

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

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

score = 0

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

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

print(score)

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

Solution (Python):
"""
A - Buttons
https://atcoder.jp/contests/abc124/tasks/abc124_a
"""
if __name__ == '__main__':
    input_list = list(map(int, input().split()))
    a = input_list[0]
    b = input_list[1]
    button_suspects = sorted([a, a-1, b, b-1], reverse=True)
    answer = button_suspects[0] + button_suspects[1]
    print(answer)

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

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

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

print(sum)

Solution (Python):
A, B = map(int,input().split())
l = [A, B, A-1, B-1]
m = sorted(l, reverse=True)
print(m[0]+m[1])

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

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

print(max(a + b, a + a_min, b + b_min))

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    a, b = [int(i) for i in input().split()]
    if a == b:
        print(a + b)
    else:
        max_ = max([a, b])
        print(max_ * 2 - 1)


if __name__ == "__main__":
    main()

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

Solution (Python):
def get_coin(a,b,coin=0):
  if a >= b:
    coin += a
    if a > 3:
      a-=1
  else:
    coin += b
    if b > 0:
      b-=1
  return a,b,coin

a = list(map(int,input().split()))
b,c,d = get_coin(a[0],a[1])
e,f,g = get_coin(b,c,d)
print(g)

Solution (Python):


import sys
input = sys.stdin.readline



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

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

Solution (Python):


import sys
input = sys.stdin.readline

def io_generator():
	return input()



def main(io):
	a,b = map(int, io().split())
	if a==b:
		ret=2*a
	else:
		c=max(a,b)
		ret=2*c-1

	return ret



if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

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

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

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

Solution (Python):
from sys import stdin

A = [0,0]
A[0], A[1] = [int(s) for s in stdin.readline().rstrip().split()]

sum = [A[0] - 1 + A[0], A[1] + A[1] -1 , A[0] + A[1]] 

print(max(sum))

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

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

Solution (Python):

AB = input().split()
A = int(AB[0])
B = int(AB[1])
result =0

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

print(result)

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

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

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

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

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

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

if a >= b:
    count += a
else:
    count += b
    
print(count)

Solution (Python):
def main(a, b):
    return max([a+a-1,
                a+b,
                b+b-1,
                b+a])


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

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

cnt = 0
for n in range(2):
    if A > B:
        cnt += A
        A -= 1
    elif A < B:
        cnt += B
        B -= 1
    else:
        cnt += A 
        A -= 1

print(cnt)

Solution (Python):

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




result = 0
if A == B:
    result = A + B
else:
    Big_num = max(A, B)
    result = Big_num*2 -1

print(str(result))

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

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

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

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

print(sum)

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

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

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

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

for j in range(2):
    if B[0] > B[1]:
        coin += B[0]
        B[0] -= 1
    else:
        coin += B[1]
        B[1] -= 1
    
print(coin)

Solution (Python):




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


if __name__ == '__main__':
    main()

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

for i,temp in enumerate(arr):
  arr[i] = int(arr[i])
  
result = 0
for i in range(2):
  result += max(arr)
  index = arr.index(max(arr))
  arr[index] = arr[index] -1
  
print(result)

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:
    ans = A
    A -= 1
else:
    ans = B
    B -= 1

print(ans+max(A,B))

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

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

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

Solution (Python):
A, B = input().split()
A, B = int(A), int(B)
list = [A, B]
s = max(list)
b = max(list) - 1
h = list.index(max(list))
del list[h]
list.append(b)
s = s + max(list)
print(s)

Solution (Python):

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

if __name__ == '__main__':
    a, b = read_input()

    result = 0

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

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

    print(result)

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

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

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

else:
    COINS=2*B-1

print(COINS)

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

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

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):



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

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

print(ans)

Solution (Python):
import numpy as np

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

ans = [A, B]

sub_max = np.max(ans)
sub_min = np.min(ans)
sub = sub_max 
sub_max -= 1
    
ans = [sub_max, sub_min]
sub_max = np.max(ans)
sub = sub + sub_max
print(sub)

Solution (Python):
a, b = [int(x) for x in input().split()]
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, A + B - 1, B + A - 1, B + B - 1]))

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

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

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

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

ma = max(n)
if n[0] == n[1]:
  print(2 * ma)
else:
  print(2 *ma - 1)

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

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

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



def calc_maximum_coins(A, B):
    if A > B:
        s, t, result = A - 1, B, A
    else:
        s, t, result = A, B - 1, B

    return result + max(s, t)


print(calc_maximum_coins(A, B))

Solution (Python):
import itertools
num = list(map(int, input().split()))
result = 0
tmp_1 = 0
tmp  =0
tmp_2 = 0
if num[0] == num[1]:
    tmp  = num[0] +  num[0]
else:
    tmp = num[0] + num[1]
    tmp_1 = num[0] + num[0] -1
    tmp_2 = num[1] + num[1] -1
print(max(tmp,tmp_1,tmp_2))

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

out=0

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

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

    gain = max(A, B)
    if A < B:
        B -= 1
    else:
        A -= 1
    gain += max(A, B)

    print(gain)

main()

Solution (Python):
from sys import stdin

l = stdin.readline().rstrip().split()
l_i = [int(s) for s in l]
l_i.sort()
a = l_i[1]
del l_i[1]
l_i.append(a-1)
l_i.sort()
c = l_i[1]
print(a + c)

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

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

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

x1 = a + (a - 1)
x2 = b + (b - 1)
x3 = a + b

print(max((x1, x2, x3)))

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

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

print(Coin)

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

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

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

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

cash = 0

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

print(cash)

Solution (Python):
import itertools
b = list(map(int, input().split()))
d = [sum(c) for c in itertools.combinations(b, 2)]
d.append(b[0] + b[0] - 1)
d.append(b[1] + b[1] - 1)
print(max(d))

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

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

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

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

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

coin=0
if A<B:
    coin+=B
    coin+=B-1
elif A>B:
    coin+=A
    coin+=A-1
elif A==B:
    coin+=A
    coin+=B

print(coin)

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

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

Solution (Python):






a, b = [int(s) for s in 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())

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

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

max = 0

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


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

print (max)

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

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

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

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

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

Solution (Python):
A,B = map(int,input().split())
i = 0
X = 0
if(A != B):
    while i <= 1: 
        X += max(A,B)
        i += 1
    print(X-1)
else:
    print(A + B)

Solution (Python):


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

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

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

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

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

count = 0

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

print(count)

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

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

Solution (Python):
list1 = []
list1 = list(map(int, input().split()))
ans = max(list1)
temp = min(list1)
if (ans-1) >temp:
    ans = ans + max(list1) - 1
else:
    ans = ans + min(list1)

print(ans)

Solution (Python):
in_a,in_b=map(int,input().split())

A=in_a
B=in_b

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

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

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

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

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

Solution (Python):
print((lambda a:max(a)*2+(a.count(max(a))-2))(list(map(int,input().split()))))

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

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

Solution (Python):

"""
Created on Sat Apr 13 21:16:53 2019

@author: yuta
"""

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

def main(ab):
    a = ab[0]
    b = ab[1]
    if a == b:
        print(2*a)
    else:
        max_ab = max(ab)
        print(2*max_ab-1)
main(AB)

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

Solution (Python):
def recur(ba,bb):
    tb = (2*bb)-1
    ta = (2*ba)-1
    bt = ba+bb
    return max(max(tb,ta),bt)

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

print(recur(a,b))

Solution (Python):
q=list(input().split())
a=int(q[0])
b=int(q[1])
for i in range(2):
  if a>=b:
    if i==0:
      r=a
    else:
      v=a
    a=a-1
  else:
    if i==0:
      r=b
    else:
      v=b
    b=b-1
g=int(r+v)
print(g)

Solution (Python):
AB=input().split()
A=int(AB[0]);B=int(AB[1])
list=[]
list.append(int(A+B))
list.append(int(A+A-1))
list.append(int(B+B-1))
print(max(list))