Problem:
 Score : 100 points    Problem Statement There are two buttons, one of size A and one of size B .  When you press a button of size X , you get X coins and the size of that button decreases by 1 .  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?      Constraints  All values in input are integers.  3 \leq A, B \leq 20         Input Input is given from Standard Input in the following format:  A  B       Output Print the maximum number of coins you can get.        Sample Input 1 5 3      Sample Output 1 9  You can get 5 + 4 = 9 coins by pressing the button of size 5 twice, and this is the maximum result.       Sample Input 2 3 4      Sample Output 2 7       Sample Input 3 6 6      Sample Output 3 12

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

ans = 0

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

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

sum = 0
for _ in range(2):
  sum += i[i.index(max(i))]
  i[i.index(max(i))] -= 1

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

Solution (Python):
a, b = (int(x) for x in 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())
if a == b:
  print(a*2)
elif a > b:
  print(a*2-1)
else:
  print(b*2-1)

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

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

lst.sort(reverse=True)
total = lst[0]
lst[0] = total - 1
lst.sort(reverse=True)
total += lst[0]

print(total)

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

for i in range(2):
    inputList.sort(reverse=True)
    res += inputList[0]
    inputList[0] -= 1

print(res)

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

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

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

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=map(int,input().split(" "))
n=0
for i in range(2):
    if A>=B:
        n+=A
        A-=1
    elif A<=B:
        n+=B
        B-=1
    
print(n)

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

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

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

print(coin)

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





import sys

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





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

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

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

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

s = 0
if(larger<=lesser):
    s = 2*larger
else:
    s = 2*larger-1

print(s)

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

Solution (Python):
inf = float("inf")

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
def input_int():return int(input())
def input_ints():return map(int,input().split())
def input_ints_list():return list(input_ints())
def input_str():return input()
def input_strs():return input().split()
def input_lines(n,f):return [f() for _ in range(n)]

import importlib
def import_module(name):return importlib.import_module(name)

def gcd_base(a,b):return import_module('fractions').gcd(a,b) 
def gcd(a):return import_module('functools').reduce(gcd_base,a) 
def lcm_base(a,b):return (a*b)//gcd_base(a,b) 
def lcm(a):return import_module('functools').reduce(lcm_base,a,1) 

def permutations(a,n):return import_module('itertools').permutations(a,n) 
def combinations(a,n):return import_module('itertools').combinations(a,n) 
def product(a,b):return import_module('itertools').product(a,b) 

def init_array_1dim(v,n):return [v]*n
def init_array_2dim(v,n,m):return [init_array_1dim for _ in range(m)]


def ceil(a):return import_module('math').ceil(a) 
def floor(a):return import_module('math').floor(a) 


def init_q(a):return import_module('collections').deque(a)
def q_pop(a):return a.popleft()
def q_push(a,v):a.appendleft(v)
def q_pushlist(a,l):a.extendleft(l)
def q_append(a,v):a.append(v)
def q_appendlist(a,l):a.extend(l)


def init_heap(a):import_module('heapq').heapify(a)
def heap_push(a,v):import_module('heapq').heappush(a,v)
def heap_pop(a):return import_module('heapq').heappop(a) 


def bisect_left(a,x):return import_module('bisect').bisect_left(a,x)
def bisect_right(a,x):return import_module('bisect').bisect_left(a,x)
def insert_left(a,x):return import_module('bisect').insert_left(a,bisect_left(a,x))
def insert_right(a,x):return import_module('bisect').insert_right(a,bisect_right(a,x))


def cumsum(a):return import_module('numpy').cumsum(import_module('numpy').array(a)) 
def cumprod(a):return import_module('numpy').cumprod(import_module('numpy').array(a)) 
def cumgcd(a):return import_module('numpy').frompyfunc(gcd_base, 2, 1).accumulate(a, dtype=import_module('numpy').object).astype(import_module('numpy').int) 

class UnionFind(object):
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]
        self.size = [1 for _ in range(n)]

    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x
            self.size[x] += self.size[y]

    def is_same(self, x, y):
        return self.find(x) == self.find(y)

    def get_size(self, x):
        x = self.find(x)
        return self.size[x]

def dfs(pos):
    ret = 0
    l = []
    for e in l:
        next = e
        ret += dfs(next)
    return ret

def bfs(l):
    q = init_q(l)
    pos = 0
    q_push(q,pos)
    while q:
        now = q_pop(q)
        for e in l:
            next = e
            q_append(q,next)


def warshall_floyd(n,graph):
    d = init_array_2dim(float("inf"),n,n)
    
    for i in range(n):
        d[i][i] = 0
        for j in range(n):
            if graph[i][j]:d[i][j] = 1
    
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d


def init_graph(n,a,directed=False):
    visited = init_array_1dim(False,n)
    graph = init_array_2dim(False,n,n)
    for e in a:
        graph[e[0]-1][e[1]-1] = True
        if not directed:graph[e[1]-1][e[0]-1] = True 
    return visited,graph

def two_pointers(s,threshold,ope='sum'):
    l,r = 0,0
    base = 0 
    if ope == 'sum':base = 0
    if ope == 'prd':base = 1
    diff = 0
    while r < len(s):
        val = 0
        if ope == 'sum':val = base+s[r]
        if ope == 'prd':val = base*s[r]
        if val <= threshold:
            if ope == 'sum':base += s[r]
            if ope == 'prd':base *= s[r]
            diff = max(diff, r-l+1)
            r += 1
        elif l == r:
            r += 1
            l += 1
        else:
            if ope == 'sum':base -= s[l]
            if ope == 'prd':base //= s[l]
            l += 1
    return diff


def solution():
    A,B = input_ints()
    if A == B:
        print(A+B)
    if A < B:
        print(B+B-1)
    if B < A:
        print(A+A-1)
	
if __name__ == '__main__':
    solution()

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

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

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

Solution (Python):
str = input()

total_coins = 0
numbers = str.split(" ")
a = int(numbers[0])
b = int(numbers[1])

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

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

print(total_coins)

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

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

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

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

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

max = 0
for i in range(0,3):
    if max < nums[i]:
        max = nums[i]

print(max)

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

Solution (Python):

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

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

Solution (Python):
import sys
a, b = map(int,sys.stdin.readline().split())
total = 0
if a == b:
  total = a + b
else:
  select_btn = max(a, b)
  total = select_btn*2-1
print(total)

Solution (Python):
import sys
import numpy as np
arr = [int(i) for i in sys.stdin.readline().split()]
total = 0
select_botton = np.argmax(arr)
for i in range(2):
  total += arr[select_botton]
  arr[select_botton] = arr[select_botton]-1
  select_botton = np.argmax(arr)
print(total)

Solution (Python):
n = input().split(' ')

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

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

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

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

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

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

ans = 0

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

print(ans)

Solution (Python):

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

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

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

if X>Y:
    print(X*2-1)
elif X<Y:
    print(Y*2-1)
else:
    print(X*2)

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

while tmp<2:
  if A > B:
    cnt+=A
    A-=1
    tmp+=1
  elif A < B:
    cnt+=B
    B-=1
    tmp+=1
  else:
    cnt+=A
    A-=1
    tmp+=1
print(cnt)

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

if A > B:
    big = A
    small = B
elif B > A:
    big = B
    small = A
else:
    big = A
    small = B

if big - small >= 1:
    ans = big*2-1
    print(ans)
else:
    ans = big*2
    print(ans)

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

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

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

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

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

coin = 0

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

print(coin)

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

if A < B:
    C = A
    A = B
    B = C

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

if A-1 < B:
    print(2*A)

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

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

Solution (Python):
a,b = [int(it) for it in 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):
p, q = map(int, input().split())

if abs(p - q) >= 1:
  score = max(p, q) * 2 - 1
else:
  score = max(p, q) * 2
print(score)

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

x = 0
for _ in range(2):
    a.sort(reverse=True)
    x += a[0]
    a[0] -= 1

print(x)

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

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

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

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

    print(ans)

    return

if __name__ == '__main__' :
    main()

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

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

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

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

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

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

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

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

a = ab[0]
b = ab[1]

ans = 0

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

if a == b:
  ans = a*2

print(ans)

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

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

Solution (Python):
AB = list(map(int, input().split()))
AB.sort(reverse=True)

if AB[0] == AB[1]:
  print(AB[0] + AB[1])
else:
  print(AB[0] + AB[0] - 1)

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

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

print(result)

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

c1=max(a,b)
c2=min(a,b)
c3=max(c1-1,c2)
print(c1 + c3)

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

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

ans = 0
if tmp[0] == tmp[1]:
    ans = tmp[0]*2
else:
    ans = max(tmp)+max(tmp)-1

print(ans)

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

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

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

x = 0
for i in range(2) :
    c = max(a,b)
    if c == a :
        x += a 
        a = a - 1
    else : 
        x += b
        b = b -1

print(x)

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


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

print(cnt)

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

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

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

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

print(point)

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

print(c)

Solution (Python):
buttons = [int(i) for i in input().split()]
tries = 2
score = 0
for i in range(tries):
    bigger = max(buttons)
    score += bigger
    buttons[buttons.index(bigger)] -= 1
print(score)

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

if i == j:
  print (i + j)
else:
  print (max(i, j) * 2 - 1)

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

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

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

Solution (Python):

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

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

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

Solution (Python):
from sys import stdin

data = [int(x) for x in stdin.readline().rstrip().split()]

ans = 0

if data[0] == data[1]:
    ans = data[0] * 2
else:
    ans = max(data) * 2 - 1

print(ans)

Solution (Python):


def main():
    a, b = map(int, input().split())
    c = []
    for i in range(2):
        if a > b or a == b:
            c.append(a)
            a = a - 1
        elif b > a:
            c.append(b)
            b = b - 1

    print(sum(c))

if __name__ == "__main__":
    main()

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

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

print(sums)

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

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

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

Solution (Python):
n=input()
ABlist=n.split()
A=int(ABlist[0])
B=int(ABlist[1])
if A>B:
    ans=A+A-1
elif A==B:
    ans=A+B
else:
    ans=B+B-1
print(ans)

Solution (Python):


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

x = 0

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

print(x)

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

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

a0 = a
a1 = a-1

b0 = b
b1 = b-1

l = [a0, a1, b0, b1]

l.sort(reverse=True)



ans = l[0]+l[1]

print (ans)

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

Solution (Python):
A,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+a-1)
elif b > a:
    print(b+b-1)
else:
    print(a+b)

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

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

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

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


y=A-B

if abs(y)>1 and A>B:
    z=A*2-1
elif abs(y)>1 and A<B:
    z=B*2-1
elif A==B:
    z=A+B
elif abs(y)==1:
    z=A+B
else:
    'N/A'

print(z)

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

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

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

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

Solution (Python):

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

a1 = A
a2 = A-1
b1 = B
b2 = B-1

li = [a1, a2, b1, b2]
s = sorted(li, reverse=True)
print(s[0]+s[1])

Solution (Python):

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


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

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

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

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

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

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

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

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

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=input().split()
A=[int(i) for i in A]
cnt=0
sum=0
while cnt<2:
    if A[0]<A[1]:
        sum+=A[1]
        A[1]-=1
    else:
        sum+=A[0]
        A[0]-=1
    cnt+=1
print(sum)

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

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

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

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

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 = input()
a = [int(i) for i in a.split()]
ret = 0
ret += max(a)
if a[0] >= a[1]:
    a[0] -= 1
else:
    a[1] -= 1
ret += max(a)
print(ret)

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

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

a, b = max(a, b), min(a, b)
ans = 2*a-1 if a-b > 1 else a+b
print(ans)

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

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

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

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

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

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

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

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

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

Solution (Python):


import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline() for _ in range(n)]
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def calc(A, B):
    if A > B:
        return A + (A - 1)
    if A < B:
        return B + (B - 1)
    return A + B

def main(A, B):
    print(calc(A, B))

A, B = i2nn()
main(A, B)

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

if __name__ == '__main__':
    main()

Solution (Python):
A,B, = map(int,input().split())
coin = 0
count = 1

while count <= 2:
    if A>=B:
        coin += A
        A -=1

    else:
        coin += B
        B -= 1

    count += 1

print(coin)

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

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

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

def push(a,b):
    if a>=b:
        return a-1,b,a
    else:
        return a,b-1,b

a,b,t=push(a,b)
print(t+push(a,b)[2])

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

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

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

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

if a[0]>a[1]:
  X+=a[0]
  a[0]-=1
else:
  X+=a[1]
  a[1]-=1

print(X)

Solution (Python):
import sys
import math

sys.setrecursionlimit(10000)
INF = float('inf')


def inp():
    return int(input())


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


def inls():
    return input().split()


def Yesif(cond):
    print('Yes' if cond else 'No')


def YESIF(cond):
    print('YES' if cond else 'NO')


def yesif(cond):
    print('yes' if cond else 'no')


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

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

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

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

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

Solution (Python):


if __name__ == "__main__":
    a,b = map(int, input().split())
    res = max(a, b)
    if (a > b):
        a -= 1
    else:
        b -= 1
    res += max(a,b)
    print(res)

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

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

print(max(max(a + b, a + a-1), 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())
list = [2*A - 1, 2*B - 1, A + B]
print(max(list))

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

Solution (Python):
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq
import itertools
import operator



inf = float('inf')
N = 0


def set_inputs():
    global N
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    
    a, b = get_li()
    print(max(a + a - 1, a + b, b + b - 1))
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


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


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    main()