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

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

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

if A < B:
    count = B + max(A, B-1)
else:
    count = A + max(A-1, B)
print(count)

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




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

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

  print(max(x, y, z))


if __name__ == '__main__':
  main()

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

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

ans += max(a,b)

print(ans)

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

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

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

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    a, b = (int(_) for _ in input().split())
    a_1 = a-1
    b_1 = b-1
    ans = max(a+a-1,b+b-1,a+b)
    print(ans)
    
if __name__ == '__main__':
    main()

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

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

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







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

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

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

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

if __name__ == '__main__':
    main()

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

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

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

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

res = 0
res += max(a,b)
a,b = max(a,b)-1,min(a,b)
res += max(a,b)
print(res)

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

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

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

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

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

coin = 0

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

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

print(coin)

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

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

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

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

count = 0

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

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

Solution (Python):

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

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

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

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

Solution (Python):
def buttons(A: int, B: int)->int:
    s = 0
    for _ in range(2):
        if A > B:
            s += A
            A -= 1
        else:
            s += B
            B -= 1
    return s


if __name__ == "__main__":
    A, B = map(int, input().split())
    ans = buttons(A, B)
    print(ans)

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

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

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

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

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

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

print(r)

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

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

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

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

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

Solution (Python):

import itertools
import sys
import math
from functools import lru_cache





from queue import Queue
from operator import mul
from functools import reduce
from queue import Queue
from operator import mul
from functools import reduce
from functools import lru_cache




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









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

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

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

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

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

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

Solution (Python):
def main():
    input = sys.stdin.readline
    try:
        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)
        
    finally:
        input = None

import sys; sys.setrecursionlimit(50000)
if __name__ == "__main__":
    main()

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

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

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

a1 = max(x, y)
if a1 == x:
    x -= 1
else :
    y -= 1

a2 = max(x,y)

print(a1+a2)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, b = LI()
    if a < b:
        a, b = b, a
    ans = a
    a -= 1
    ans += max(a, b)
    print(ans)
    return


def B():
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    A()

Solution (Python):
A, B = [int(i) for i in input().split()]
c, d = sorted((A, B))
ans = d
d -= 1
e, f = sorted((c, d))
ans += f
print(ans)

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

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


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

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

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

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

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

Solution (Python):

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

@author: Yamazaki Kenichi
"""

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

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

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

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

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

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

Solution (Python):

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

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

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



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

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

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

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

Solution (Python):
import math
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

A,B = IL()

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

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

Solution (Python):

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

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

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

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

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

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

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())
print(2*A if A==B else 2*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):
import bisect
from collections import deque
from collections import defaultdict
from fractions import gcd

from math import sqrt
from math import ceil
from itertools import permutations
from heapq import *


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

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

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

print(ans)

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

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

Solution (Python):
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
nsl = lambda: map(str, sys.stdin.readline().split())

a,b = nm()

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

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

Solution (Python):

import sys
INF = float("inf")


def solve(A: int, B: int):

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


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)


if __name__ == '__main__':
    main()

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

Solution (Python):
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

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

ma = [a+a-1,b+b-1,a+b]

print(max(ma))

Solution (Python):

import sys


def solve(A: int, B: int):
    if A == B:
        ret = A + B
    else:
        ret = max(A, B) * 2 - 1
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

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

Solution (Python):


from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

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

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

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

print(result)

Solution (Python):


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

res = max([A+B,A+A-1,B+B-1])

print(res)

Solution (Python):
import sys

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

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


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

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

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

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

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

Solution (Python):


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

coin = 0
if a >= b:
    coin += a
    a -= 1
else:
    coin += b
    b -= 1
if a >= b:
    coin += a
    a -= 1
else:
    coin += b
    b -= 1

print(coin)

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

a_min = a-1
b_min = b-1
print(max(a+b,a+a_min,b+b_min))

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

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

x = []

x.append(a + a-1)
x.append(b + b-1)
x.append(a + b)
print(max(x))

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*2-1, A+B, B*2-1])
print(ans)

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

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A,B=MAP()

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import random

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 list(map(int, sys.stdin.readline().split()))
def LLI(): return [tuple(map(int, l.split())) for l in sys.stdin]
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 S(): return input()
def pf(s): return print(s, flush=True)

def main():
    a = sorted(LI())
    r = a[-1]
    a[-1] -= 1

    return r + max(a)


print(main())

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

Solution (Python):
import atexit
import io
import sys

buff = io.BytesIO()
sys.stdout = buff


@atexit.register
def write():
    sys.__stdout__.write(buff.getvalue())

a,b = map(int, raw_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):
A,B = [int(i) for i 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=list(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())
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 = map(int,input().split())
if a == b:
    print(a*2)
else:
    tmp = a if a > b else b
    print(tmp + tmp -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())


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

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

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

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

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

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

Solution (Python):

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

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

c = max(a,b)

if c==a:
    a-=1
else:
    b-=1
    
d = max(a,b)

print(c + d)

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
import collections
from operator import itemgetter

def j(q):
    if q==1: print("Yay!")
    else:print(":(")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)


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







a.sort()
s = a[1]
a[1]-=1
print(s+max(a))

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

Solution (Python):
from sys import stdin
from collections import deque, defaultdict as ddic
from itertools import combinations, permutations, product
import bisect
import heapq

rs = lambda: stdin.readline().strip()
ri = lambda: int(rs())
rsl = lambda: stdin.readline().split()
rim = lambda: map(int, rsl())
ril = lambda: list(rim())

a, b = rim()
ans = 0
if a > b:
    ans += a
    a -= 1
else:
    ans += b
    b -= 1
    
if a > b:
    ans += a
    a -= 1
else:
    ans += b
    b -= 1

print(ans)

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

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


if __name__ == "__main__":
    main()

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