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

Solution (Python):
import sys
input = sys.stdin.readline
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())
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 abs(a-b) >= 1:
    s = max(a,b)
    print(2*s-1)
else:
    print(2*a)

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

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

elif a > b:
  print(a + a - 1)

elif a < b:
  print(b + b - 1)

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

ans = [N[0]*2 - 1,N[0]+N[1],N[1]*2 -1]

print(max(ans))

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

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

Solution (Python):
import sys
input=sys.stdin.readline
'''
N=int(input())
H=map(int,input().split())
'''
N=list(map(int,input().split()))
s=0
for _ in range(2):
  if N[0]>N[1]:
    s+=N[0]
    N[0]-=1
  else:
    s+=N[1]
    N[1]-=1
print(s)

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

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

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

coin = 0

def get_coin(coin, A, B):
    if A >= B:
        coin += A
        A -= 1
    else:
        coin += B
        B -= 1
    return coin, A, B

for _ in range(2):
    coin, A, B = get_coin(coin, A, B)

print(coin)

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

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

if A < B:
    result += B
    B -= 1
else:
    result += A
    A -= 1
print(result)

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

Solution (Python):


def solve():
    A, B = list(map(int, input().split(" ")))

    ans = 0

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


if __name__ == "__main__":
    solve()

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

Solution (Python):
X = list(map(int, [i for i in input().split(" ")]))

if X[0] == X[1]:
  print(X[0]*2)
elif X[0] > X[1]:
  print(X[0]*2-1)
else:
  print(X[1]*2-1)

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):
bottuns=list(map(int, input().split())) 
coins=0
for i in range(2):
    index = bottuns.index(max(bottuns))
    coins += bottuns[index]
    bottuns[index] = bottuns[index] - 1

print(coins)

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

if a>b:
    sum=2*a-1
if a==b:
    sum=2*a
if b>a:
    sum=2*b-1

print(sum)

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

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

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

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

Solution (Python):
s = input().rstrip().split(' ')
A = int(s[0])
B = int(s[1])
total = 0
for i in range(2):
    if A >= B:
        total = total + A 
        A = A - 1
    elif A < B:
        total = total + B
        B = B - 1
print(total)

Solution (Python):
a,b = map(int, input().split())
print(a + b if a == b else max(a * 2 - 1, 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 = 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):
from sys import stdin
s_data = stdin.readline().rstrip().split()
data = [int(itr) for itr in s_data]
ans = 0
ans += max(data)
data[data.index(max(data))] -= 1
ans += max(data)
print(ans)

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

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

Solution (Python):
import numpy as np

ab = [int(i) for i in input().split()]

result = 0

for _ in range(2):
  idx_big = np.argmax(ab)
  result += ab[idx_big]
  ab[idx_big] -= 1
  
print(result)

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

S = 0

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

Solution (Python):


"""
Created on Sat Apr 13 20:56:51 2019

@author: shuto
"""


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

tmp = 0
if(A >= B):
    tmp += A
    A = A-1
else:
    tmp = B
    B = B-1
 
if(A >= B):
    tmp += A

else:
    tmp += B

    

print(tmp)

Solution (Python):
A, B = map(int, input().split())
big = max(A,B)
small = min(A,B)

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

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

c = a-1
d = b-1
e = [a,b,c,d]
e = sorted(e, reverse=True)
print(sum(e[:2]))

Solution (Python):



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


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

print(point)

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

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

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

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

Solution (Python):


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

    tmp = [A, B, A-1, B-1]
    tmp.sort()
    
    print(sum(tmp[-2:]))



if __name__ == '__main__':
    main()

Solution (Python):
n,m=input().split()
m=int(m)
n=int(n)
t = 0
if(n==m):
    t = 2*m
if(n>m):
    t = n + (n-1)
if(m>n):
    t = m + (m-1)
print(t)

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

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

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

Solution (Python):


from sys import stdin
    
def main():
    a,b = [int(x) for x in stdin.readline().rstrip().split()]
    ans = 0
    for x in range(2):
        if a > b:
            ans += a
            a -= 1
        else:
            ans += b
            b -= 1
    print(ans)
    
if __name__=='__main__':
    main()

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

Solution (Python):


l = [int(x) for x in input().split()]

maxx = max(l)
minn = min(l)

if(maxx == minn):
	print(2*maxx)
else:
	print(2*maxx -1)

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

for i in range(2):
  X += A[A[1] > A[0]]
  A[A[1] > A[0]] -= 1
  
print(X)

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

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

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True)

A, B = LI()

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

Solution (Python):
ar = []                                            
raw = raw_input().split()                          















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




first = max(a,b)                                   

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


second = max(a,b)                                  

print first + second

Solution (Python):
import sys
import io
import math
import re

datalist = input().split()
data_a = int(datalist[0])
data_b = int(datalist[1])


if data_a - data_b >= 2:
  print(data_a*2-1)
elif data_b - data_a >= 2:
  print(data_b*2-1)
else:
  print(data_a+data_b)

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

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

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

Solution (Python):


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

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

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

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

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

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

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

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

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

main()

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

ans = 0

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

print(ans)

Solution (Python):
A, B = map(int, input().split())
list_ab = [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

print(ans)

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

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

Solution (Python):

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

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

g = 0
p = ''

if (A >= B):
	p = 'A'
	g = g + A
	A = A - 1
else:
	p = 'B'
	g = g + B
	B = B - 1

if (A >= B):
	p = 'A'
	g = g + A
	A = A - 1
else:
	p = 'B'
	g = g + B
	B = B - 1

print(g)

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

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

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

Solution (Python):
A, B = list(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(2 * a)
else:
    print(max(a, b) * 2 - 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 = [int(c) for c in input().split()]

x = 0

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

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

print(x)

Solution (Python):
a,b = list(map(int,input().strip().split(" ")))
s1 = a+a-1
s2 = a+b
s3 = b+b-1
print(max(s1,s2,s3))

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 = [int(s) for s in input().split()]
if A > B:
    print(A + A - 1)
elif B > A:
    print(B + B - 1)
else:
    print(2 * A)

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

Solution (Python):


a,b = 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 = (int(i) for i in input().split())
h = 0

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

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

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):
"""
python3 a.py < input.txt
"""
import math
import itertools as it
import heapq

A,B=map(int,input().split())
x=0
if A<B:
    x+=B
    B=B-1
else:
    x+=A
    A=A-1

print(x+max([A,B]))

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

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

Solution (Python):
import sys

A, B = map(int, sys.stdin.readline().split())

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

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

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

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

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

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

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

Solution (Python):


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

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

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

Solution (Python):
a, b = [int(x) for x in 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 x in range(2):
    if A > B:
        ans += A
        A -= 1
    else:
        ans += B
        B -= 1
print(ans)

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

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

print(x)

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


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

list = [x,y,z]

max = max(list)


print(max)

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

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

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

print(c)

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

Solution (Python):
def button(a):
    if max(a)*2-1>sum(a):
        return max(a)*2-1
    else:
        return sum(a)
a=list(map(int,input().split()))
print(button(a))

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):
tmp=input().split(" ")
a = int(tmp[0])
b = int(tmp[1])

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

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

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

print(S)

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

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

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

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

print(ans)

Solution (Python):
a, b = [int(_) for _ 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())
a = A + A-1
b = B + B-1
c = A + B
print(max(a,b,c))

Solution (Python):
a, b = [int(_) for _ in 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
    elif A < B:
        count += B
        B -= 1
    elif A == B:
        count += A
        A -= 1

print(count)

Solution (Python):
import sys






"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)


"""ここからメインコード"""


def main():
    
    r, e, p = range, enumerate, print
    ip = IP()
    id = Idea()
    mod = 10 ** 9 + 7

    """この下から書いてね"""
    a, b = ip.IL()
    ans = 0
    if a > b:
        ans += a
        a -= 1
    else:
        ans += b
        b -= 1

    if a > b:
        ans += a
    else:
        ans += b
    p(ans)


main()

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

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

print(total)

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

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

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

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

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

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

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

Solution (Python):

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

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):
x,y = map(int,input().split())
num = max(x,y) + max(max(x,y)-1,min(x,y))
print(num)

Solution (Python):
from sys import stdin

a, b = [int(x) for x in stdin.readline().rstrip().split()]

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

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

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

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

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def ii(): return int(stdin.readline())
def li(): return map(int, stdin.readline().split())
A, B = tuple(li())
if A == B:
    print(A * 2)
else:
    C = max(A, B)
    print(2*C -1)

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

print(max(max(sum(a),a[0]*2-1),a[1]*2-1))

Solution (Python):

AB = input().split()
A = int(AB[0])
B = int(AB[1])
ans = 0
if A>B:
  ans +=A
  A = A -1
else:
  ans +=B
  B = B -1

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

print(ans)

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

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

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

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

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

Solution (Python):
def main():
    result = sub()
    print(result)


def sub():
    a, b = [int(x) for x in (input().split())]
    result = 0
    if a > b:
        result += a
        a = a - 1
    else:
        result += b
        b = b - 1

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


if __name__ == '__main__':
    main()

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

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

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

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

print(sumn)

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

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

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

print(ans)

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

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

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

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

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

Solution (Python):

A, B = map(int,input().split())
cnt = 0
if A >= B:
    A, B = B, A
cnt = B
B -= 1
cnt += max(A,B)
print(cnt)

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

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

print(out)

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

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

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

Solution (Python):
li = [int(a) for a in input().split()]
print(max(li) + max(li) - 1) if li[0]!=li[1] else print(max(li)*2)