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

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

r = mx
mx -= 1
r += max(mx, mn)

print(r)

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

max1 = max(input)
min = min(input)
compare = max1 - 1
list = [min,compare]
max2 = max(list)

result = max1 + max2
print(result)

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):
input_number = input().split()

a = int(input_number[0])
b = int(input_number[1])

max_number = 0

if a >= b:
    max_number += a
    a -= 1

else:
    max_number += b
    b -= 1


if a >= b:
    max_number += a

else:
    max_number += b

print(max_number)

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

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

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

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

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

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):
from sys import exit
A,B = [int(n) for n in input().split()]






ans = 0
if A < B:
    ans = ans + B
    B-=1
else:
    ans = ans + A
    A-=1

ans+=max(A,B)
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(2 * a)

Solution (Python):
A,B=[int(e) for e in input().split(' ')]
print(max([A+A-1,A+B,B+B-1]))

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

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

Solution (Python):
import math
import os
import random
import re
import sys
from collections import defaultdict

if __name__ == '__main__':
    s, k = map(int, input().split())
    print(max(s+s-1,s+k,k+k-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
else:
  print(ans)

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

num_coins = 0

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

print(num_coins)

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

Solution (Python):

import numpy as np

def main():
    i=list(map(int, input().split()))
    coin=0
    if (i[0]<i[1]):
        coin =coin+i[1]
        i[1] =i[1]-1
    else:
        coin = coin + i[0]
        i[0] = i[0] - 1
    if (i[0] < i[1]):
        coin = coin + i[1]
        i[1] = i[1] - 1
    else:
        coin = coin + i[0]
        i[0] = i[0] - 1
    print(coin)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v

def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    A, B = li_input()

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

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

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

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

if A == B:
    ret = A * 2
    print(ret)

else:
    ret = max([A, B]) * 2 - 1
    print(ret)

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

print(s)

Solution (Python):
import sys

def main(argv):
    a, b = map(int, input().rstrip().split(' '))
    if a == b:
        print(a + b)
    else:
        print(max(a, b) * 2 - 1)

if __name__ == '__main__':
    main(sys.argv)

Solution (Python):
n=[i for i in input().split()]
a=int(n[0])
b=int(n[1])
S1=a+b
S2=a+a-1
S3=b+b-1

p=[S1,S2,S3]
print(max(p))

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

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

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

Solution (Python):
def button(x,y):
  return max(2*x-1, 2*y-1, x+y)

inputs = input()
x,y  = list(map(lambda x:int(x),inputs.split()))
print(button(x,y))

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

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

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

if a > b:
  count = a
  a = a - 1
  if a > b or a == b:
    count = count + a
elif b > a:
  count = b
  b = b - 1
  if b > a or a == b:
    count = count + b
else:
  count = a
  count = count + b

print(count)

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

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

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

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

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

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

print(coins)

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):
i = list(map(int,input().split()))
count = 0;

for num in range(2):
    if(i[0] < i[1]):
        count = count + i[1]
        i[1] = i[1] - 1
    else:
        count = count + i[0]
        i[0] = i[0] - 1

print(count)

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

Solution (Python):
import numpy as np


def get_coin(button_sizes):
    largest_button = np.argmax(button_sizes)
    earned = button_sizes[largest_button]
    button_sizes[largest_button] -= 1
    return earned


if __name__ == '__main__':
    button_sizes = np.array([int(x) for x in input().split(' ')])
    coin = 0
    for i in range(2):
        coin += get_coin(button_sizes)
    print(coin)

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

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

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

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

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

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

if __name__ == "__main__":
    Main()

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

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

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

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

print(c+d)

Solution (Python):
n = input().split()
count = 0
if int(n[0]) > int(n[1]):
  count +=int(n[0])
  if int(n[0])-1 > int(n[1]):
    count +=int(n[0])-1
  else:
    count +=int(n[1])
else:
  count +=int(n[1])
  if int(n[1])-1 > int(n[0]):
	  count +=int(n[1])-1
  else:
	  count +=int(n[0])

print(count)

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

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

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

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

A = int(in_list[0])
B = int(in_list[1])
coin_sum = 0

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

print(coin_sum)

Solution (Python):


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

ans = 0

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

print(ans)

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

Solution (Python):
A,B = (int(x) for x in input().split())
if A >= B :
    C = A
    A = A - 1
else :
    C = B
    B = B - 1

if A >= B :
    C = C + A
else :
    C = C + B
print( C )

Solution (Python):



A, B = map(int, raw_input().split())
print '{}'.format( max(A+A-1, max(B+B-1, A+B)) )

Solution (Python):
def Y(flag):
    if flag:
        print('YES')
    else:
        print('NO')
 
def y(flag):
    if flag:
        print('Yes')
    else:
        print('No')
 
a,b = map(int,input().split())
l = [a,b,a-1,b-1]
l = sorted(l)
print(l[-1] + l[-2])

Solution (Python):
from sys import stdin
A,B = map(int,stdin.readline().rstrip().split())
if A == B :
    print(A+B)
if A > B :
    print(A*2-1)
if A < B :
    print(B*2-1)

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

Solution (Python):
def func(a, b):
    if a > b:
        return 2*a - 1
    elif a < b:
        return 2*b - 1
    else:
        return 2*a

[sa, sb] = input().split()
a = int(sa)
b = int(sb)
print(func(a,b))

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

for _ in range(2):
    c += max(A, B)
    if max(A, B) == A:
        A = A - 1
    elif max(A, B) == B:
        B = B - 1

print(c)

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:
  tmp = b
  b = a
  a = tmp

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

if a != b:
  result = result - 1
 
print(result)

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

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

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

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

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

sum = 0

sum += max(A, B)

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

print(sum)

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

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

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

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

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

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

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

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

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

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

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

result = result + max(a,b)

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

print(result)

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

Solution (Python):
A, B = input().split()
coin = 0
A = int(A)
B = int(B)
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 = [int(s) for s in input().split(" ")]
print(max(a) * 2 if max(a) == min(a) else max(a) * 2 - 1)

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

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

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

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(a+b)
    exit()
if a > b:
    print(2*a -1)
else:
    print(2*b - 1)

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

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

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

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

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

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

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

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

Solution (Python):

from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
res = 0
if a > b:
    res += a
    a -= 1
else:
    res += b
    b -= 1
res += a if a > b else b
print("{}".format(res))

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

Solution (Python):
s = input().split()
 
if int(s[0]) < int(s[1]):
  s1 = int(s[0])
  s2 = int(s[1])
else:
  s1 = int(s[1])
  s2 = int(s[0])
  
result = 0
if (s2-s1) >= 2:
  result = s2*2 - 1
else:
  result = s2 + s1
 
print(result)

Solution (Python):



def main():
    a, b = map(int, 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,2*B-1,A+B))

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

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

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

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

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

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

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

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

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

Solution (Python):
a,b = map(int,input().split())
c = 0
for i in range(0, 2):

    if a < b :
        c += b
        b = b - 1
    else:
        c += a
        a = a - 1

print(c)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
a,b = sys.stdin.readline().rstrip('\n').split()
a = int(a)
b = int(b)
print(max(a+b,a*2-1,b*2-1))

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

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

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

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

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

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

Solution (Python):
import sys

ｖ = input().split(' ')
a = int(v[0])
b = int(v[1])

vals = [2*a-1, 2*b-1, a+b]

print(max(vals))

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

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

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

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

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

if int(a[1]) != int(a[0]):
	print (2*int(a[1])-1)
else:
	print (int(a[0]) + int(a[1]))

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

Solution (Python):
def solve(A, B, n):
    if n == 1:
        return max(A, B)
    else:
        n -= 1
        h, l = max(A, B), min(A, B)
        return h + solve(h-1, l, n)

A, B = map(int, input().split())
print(solve(A, B, 2))

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

Solution (Python):


import math, itertools, operator
from math import *
from math import factorial as fact
from functools import reduce
from statistics import mean, median, median_low, median_high, mode

from fractions import gcd





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

def perm(a, b):
    import scipy.special
    return scipy.special.perm(a, b, exact = True)

def comb(a, b):
    import scipy.special
    return scipy.special.comb(a, b, exact = True)

def dfact(n):
    import scipy.special
    return scipy.special.factorial2(n, exact = True)

def prod(l):
    return reduce(operator.mul, l)

def input_ints(inp = input, sep = ' ', conv = int):
    return map(conv, inp().split(sep = sep))



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

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

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

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

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

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

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())
total = 0
for _ in range(2):
    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 * 2)
else:
  print(max(a, b) * 2 - 1)

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

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

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

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

Solution (Python):
def main():
    a, b = map(int, input().split())
    x = sorted([a, a - 1, b, b - 1], reverse=True)
    print(sum(x[:2]))

main()

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

re = 0

for i in range(0,len(input)):
  re += max(input)
  input[input.index(max(input))] = max(input) - 1
  
print(re)

Solution (Python):
NUM_PUSH = 2


def main():
    A, B = map(int, input().split())
    sum = 0
    for i in range(NUM_PUSH):
        if A >= B:
            push = A
            A -= 1
        else:
            push = B
            B -= 1
        sum += push
    print(sum)


if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()

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

coin = 0

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

print(coin)

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

if(a[0]>a[1]):
  sum+=a[0]
  a[0]-=1
else:
  sum+=a[1]
  a[1]-=1

print(sum)

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

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

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

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

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

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

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

print(num_coin)

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

a=li[0]
b=li[1]

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

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

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

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

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

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

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

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

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

print(SUM)

Solution (Python):
A, B = map(int, input().split())
ans = 0
i = 2
while i > 0:
    if i==2 and A == B:
        ans = 2 * A
        break

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

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