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

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

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

Solution (Python):
from itertools import product
A, B = list(map(int, input().split()))
print(max(a+b for a, b in product([A, B-1], [B, A-1])))

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

Solution (Python):

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

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

    print(coin)


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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

Solution (Python):
x = input()
a = int(x.split(" ")[0])
b = int(x.split(" ")[1])
c = a + a - 1
d = a + b
e = b + b - 1
print(max([c,d,e]))

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

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

ans = 0

for i in range(2):
    if A == max(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())
print(max(2*a-1,a+b,2*b-1))

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys

inputs = [row.split() for row in sys.stdin.readlines()]

values = []
for current_row in inputs:
    for value in current_row:
        values.append(int(value))

if values[1] < values[0]:
    val_1 = values[0]
    values[0]=values[0]-1
else:
    val_1 = values[1]
    values[1]=values[1]-1

if values[1] < values[0]:
    val_2 = values[0]
else:
    val_2 = values[1]

print(val_1+val_2)

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

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

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

while cnt < 2:
	if A > B:
		sum += A
		A -= 1
		cnt += 1
	else:
		sum += B
		B -= 1
		cnt += 1

print(sum)

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

print(ans)

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

Solution (Python):



n = [int(x) for x in input().split()]
if len(set(n)) == 1:
    print(max(n) * 2)
else:
    print(max(n) * 2 - 1)

Solution (Python):
h,w = map(int,input().split())
if max(h,w) >= min(h,w)+2:
    print(max(h,w) + max(h,w) - 1)
else:
    print(h+w)

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

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

ans = 0

list_1 = sorted([A,B],reverse=True)
ans += list_1[0]
list_2 = sorted([ans-1,list_1[1]],reverse=True)
ans += list_2[0]
print(ans)

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

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

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):
import sys
from collections import deque, Counter, defaultdict
from fractions import gcd
input = sys.stdin.readline

def eprint(s):
    if type(s) != type('str'):
        s=str(s)

    sys.stderr.write(s+'\n')
    return

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

    cnt = 0
    if a > b:
        cnt += a
        a -= 1
    else:
        cnt += b
        b -= 1
    if a > b:
        cnt += a
        a -= 1
    else:
        cnt += b
        b -= 1
    print(cnt)
    return

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

    ans = 0

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

    print(ans)

if __name__ == '__main__':
    main()

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

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

if min < max:
    print(2*max-1)
else:
    print(2*max)

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

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

Solution (Python):




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


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

Solution (Python):
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


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

if __name__ == '__main__':    
    main()

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

coin = 0
coin += a
a -= 1

if a >= b:
    coin += a
else:
    coin += b

print(coin)

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

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

Solution (Python):
val = list(map(int, input().split()))
val.sort()
cnt = 0
for i in range(2):
    cnt += val[1]
    val[1] -= 1
    val.sort()
print(cnt)

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())
print(max(2*a-1,2*b-1,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):
import sys
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

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

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

one = max(A, B)
if one == A:
    two = max(A-1, B)
else:
    two = max(A, B-1)
print(one + two)

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

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

Solution (Python):

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

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

x = [A + A - 1, B + B - 1, A + B]

print(max(x))

Solution (Python):
a, b = map(int, open(0).read().split())

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

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

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

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

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

mod = 1000000007
inf = 1 << 60
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

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

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

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

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

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

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

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

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(A + B)
else:
    maxAB = max(A, B)
    print(maxAB + maxAB -1)

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

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

Solution (Python):
import sys
import fractions
import math
import itertools

a,b=list(map(int,input().split()))
ans=0

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

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

Solution (Python):
import sys

a, b = map(int, sys.stdin.readline().split())
if a > b: a, b = b, a

def main():
    return b * 2 if a == b else b * 2 - 1

if __name__ == '__main__':
    ans = main()
    print(ans)

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

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

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

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

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

ans = 0

ans += max(A,B)

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

ans += max(A,B)

print(ans)

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

print(n)

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

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

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

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

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

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

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

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

Solution (Python):



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

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

ans = 0
num = 0

while num < 2:
    if a >= b:
        ans += a
        a -= 1
    else:
        ans += b
        b -= 1
    num += 1
print(ans)

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

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

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

print(ans)

Solution (Python):
n, m=[int(k) for k in input().split()]
cont=0
for i in range(2):
    if n>m: 
        cont+=n
        n-=1
    elif m>=n:
        cont+=m
        m-=1
print(cont)

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

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

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):
a, b = map(lambda x: int(x), 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):
def main():
    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)
    
if __name__ == '__main__':
    main()

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

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

print(r)

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

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

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

Solution (Python):
"""
author : halo2halo
date : 12, Jan, 2020
"""

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, readline().split())

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

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

total = 0

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

print(total)

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

Solution (Python):
def main():
    A, B = map(int, input().split(" "))
    L = []
    L.append(A)
    L.append(B)
    L.append(A - 1)
    L.append(B - 1)
    L.sort(reverse=True)
    print(L[0] + L[1])


if __name__ == '__main__':
    main()

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

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

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

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

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

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

result = 0

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

print(result)

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

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

Solution (Python):
import os, sys, re, math

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

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

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

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

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

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

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

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

print(max(ans))

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

Solution (Python):
def main():
  if 'get_ipython' not in globals():  
    a,b = map(int,input().split())
  else:
    a,b = 5,3
    s = "test"
 
  
  def get(a,b, count, ans):
    if count == 0:
      return(ans)
    
    if a >= b:
      return(get(a-1, b, count -1, ans + a))
    else:
      return(get(a, b-1, count -1, ans + b))
  
  print(get(a, b, 2, 0))
  
main()

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

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

Solution (Python):
n=sorted(map(int, input().split()))
nn=sorted([n[0],n[1]-1])
print(n[1]+nn[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())
sum = 0

if A > B:
    sum += A
    A = A-1
else:
    sum += B
    B = B-1

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

print(sum)

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

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

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

Solution (Python):
A, B = map(int, open(0).read().split())

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

Solution (Python):
a, b=map(int,input().split())
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())
sum=0
for _ in range(2):
  sum += max(a,b)
  if a > b:
    a -= 1
  elif a < b:
    b -= 1
print(sum)

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

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

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if a>=b:
        c=a-1
        d=b
    else:
        c=b-1
        d=a
    print(max(a,b)+max(c,d))
if __name__ == '__main__':
    do()

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

Solution (Python):


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

main()

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

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

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

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

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

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

x=a+a-1
y=b+b-1
z=a+b
print(max(x,y,z))

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

coin = 0

for _ in range(2):
    if a > b:
        coin += a
        a -= 1
    elif a < b:
        coin += b
        b -= 1
    else:
        coin += a
        a -= 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())

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

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

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

total = 0

total += max(a, b)

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

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

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

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

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

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


a, b = list(map(int, sys.stdin.buffer.readline().split()))
if a > b:
    print( a * 2 - 1)
elif a == b:
    print(a * 2 )
else:
    print(b * 2 - 1)

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

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

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

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


if __name__ == '__main__':
    solve()