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

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

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

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

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

if a > b or a < b:
    m = max(a, b)
    print(2 * m - 1)
elif a == b:
    print(a + b)

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

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

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

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

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

ans=0
for _ in range(2):
  if A<B:
    temp=B
    B-=1
  else:
    temp=A
    A-=1
  ans+=temp

print(ans)

Solution (Python):
import math


def main():
    
    a, b = map(int, input().split())
    
    
    
    count = 0
    if a < b:
        count += b
        b = b - 1
    else:
        count += a
        a = a - 1
    if a < b:
        count += b
        b = b - 1
    else:
        count += a
        a = a - 1

    print(count)


if __name__ == '__main__':
    main()

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

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

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

A = a + b
B = a + a - 1
C = b + b - 1

L = [A, B, C]

print(max(L))

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

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

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

Solution (Python):
rStr = input()

A = int(rStr.split(' ')[0])
B = int(rStr.split(' ')[1])

result = 0
index = 0

while index < 2 :
    if A <= B :
        result += B
        B = B - 1
    else :
        result += A
        A = A - 1
    index = index + 1

print(result)

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

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

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

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

Solution (Python):
from sys import stdin
input = lambda: stdin.readline().rstrip()
a, b = map(int, input().split())
if a > b:
    ans = a + a - 1
elif a < b:
    ans = b + b - 1
else:
    ans = a + b
print(ans)

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


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

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

Solution (Python):
def count_coin_maximum():
    a_button, b_button = map(int, input().split())
    if a_button == b_button:
        return a_button + a_button
    elif a_button > b_button:
        return a_button + max(a_button - 1, b_button)
    else:
        return b_button + max(b_button - 1, a_button)


print(count_coin_maximum())

Solution (Python):
a = list(map(int,input().split()))
ans = 0
if a[0]>a[1]:
  ans += a[0]
  a[0] -= 1
else:
  ans += a[1]
  a[1] -= 1
if a[0]>a[1]:
  ans += a[0]
else:
  ans += a[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())
C=max(2*A-1,A+B,2*B-1)
print(C)

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

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

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

print(max(list))

Solution (Python):





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

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

print(c)

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

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

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

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

Solution (Python):
l=input().rstrip().lstrip().split(" ")
print(max(int(l[0]), int(l[1])) + max(min(int(l[0]), int(l[1])), max(int(l[0]), int(l[1])) - 1))

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

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

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

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
from heapq import heapify, heappop, heappush
import math
import random
import string
from copy import deepcopy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7





A, B = getNM()
que = []
heapify(que)
heappush(que, -A)
heappush(que, -B)

ans = 0
for i in range(2):
    u = heappop(que)
    ans += -u
    heappush(que, u + 1)
print(ans)

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

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

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

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

for i in range(2):
    ans += max(AB)
    AB[AB.index(max(AB))] -= 1

print(ans)

Solution (Python):
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, b = Input()
    c1 = a + b
    c2 = a + a -1
    c3 = b + b -1
    print(max(c1, c2, c3))



main()

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

Solution (Python):

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

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

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

Solution (Python):
x=[int(i) for i in input().split()]
x.append(x[0]-1)
x.append(x[1]-1)
x.sort()
print(sum(x[2:]))

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

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

    print(ans)


if __name__ == "__main__":
    main()

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

    if a >= b + 2:
        ans = a + a - 1
    elif b >= a + 2:
        ans = b + b - 1
    else:
        ans = a + b

    print(ans)


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ans = 0
for _ in range(2):
    choice = max(a, b)
    ans += choice
    if choice == a:
        a -= 1
    else:
        b -= 1

print(ans)

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

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

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

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

    return


if __name__ == '__main__':
    main()

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    vec = [A, B, A-1, B-1]
    vec.sort(reverse=True)

    print(sum(vec[:2]))

    return


if __name__ == '__main__':
    main()

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

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

Solution (Python):
def examA():
    A = LI()
    A.sort()
    ans = A[1] + max(A[1]-1,A[0])
    print(ans)
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examA()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

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())
x = max(A,B)
x += max(x-1,min(A,B))
print(x)

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

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

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

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

Solution (Python):


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Solution (Python):
a, b = list(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())
ans=0
for i in range(2):
    if a<b:
        ans+=b
        b-=1
    else:
        ans+=a
        a-=1
print(ans)

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

n=0
n+=M
M-=1

n+=max(M,m)

print(n)

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

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

M = max(a,b)
m = min(a,b)

n = 0
n += M

M -= 1

n += max(M,m)

print(n)

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

coinGainList = []

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

Solution (Python):

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


if __name__ == "__main__":
    main()

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

res = 0
if a < b:
    res = 2 * b - 1
elif a == b:
    res = 2 * a
else:
    res = 2 * a - 1

print(res)

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

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

Solution (Python):
c=[int(i) for i in input().split()]
print(max(sum(c),2*max(c)-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 sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

def main():
    A,B=mi()
    print(max(A+B,A+A-1,B+B-1))

                





if __name__ == "__main__":
    main()

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

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

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

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

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

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    A, B = LI()

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

    print(ans)

if __name__ == '__main__':
    resolve()

Solution (Python):
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    a, b = nm()
    c = max(a, b)
    d = max(c - 1, min(a, b))
    print(c + d)


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

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

print(res)

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

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

Solution (Python):
a,b=list(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())
botan = [A, A-1, B, B-1]
botan.sort()
print(botan[-1]+botan[-2])

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

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

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

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

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

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

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

Solution (Python):
N=sorted(list(map(int,input().split())))
A=N[0]
B=N[1]
if A==B:
    print(A+B)
else:
    print(B+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())
res = sorted([A,A-1,B,B-1],reverse=True)
print(res[0]+res[1])

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

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

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

Solution (Python):













































def log(line):
    if False:
        print(line)


def calculation(lines):
    
    
    A, B = list(map(int, lines[0].split()))
    
    
    
    
    
    
    
    

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

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['5 3']
        lines_export = [9]
    if pattern == 2:
        lines_input = ['3 4']
        lines_export = [7]
    if pattern == 3:
        lines_input = ['6 6']
        lines_export = [12]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

A,B = MI()

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

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

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

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

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

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

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

l.sort()

if  l[0] != l[1]:
    print((l[1] * 2 ) - 1)

elif l[0] == l[1]:
    print(l[1] * 2)

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

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

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

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007



def main():
	
	b , c = tin()
	
	ret = max(b+c,b+b-1, c+c-1)
	print(ret)
	
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

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

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

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

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

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

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

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

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

Solution (Python):
def push(X):
    coin=X
    X-=1
    return X,coin
A,B=map(int,input().split())
coin=0
if A>B:
    A,coin=push(A)
else:
    B,coin=push(B)
if A>B:
    coin+=A
else:
    coin+=B
print(coin)