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

"""
Created on Sat Apr 13 09:52:51 2019

@author: Owner
"""

import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter
import itertools
import copy
import bisect


def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default


"""
N, X = map(int, input().split())

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

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())

    
all(nstr.count(c) for c in '753')


ABT = zip(A, B, totAB)
result = 0

sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)


opn = set()
opn.add(start)
opn.remove(start)


(x >> i) & 1


dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break

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

def main():    
    print(max(A+A-1, A+B, B+B-1))    
 
if __name__ == '__main__':
    main()

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

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

score = 0

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

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

print(score)

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

Solution (Python):
AB = [int(i) for i in input().split()]
output = 0
for i in range(2):
    AB.sort(reverse = True)
    output += AB[0]
    AB[0] -= 1

print(output)

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):
p=input().split()
a,b=int(p[0]), int(p[1])
c=0
for i in range(2):
    m=max([a,b])
    c+=m
    if a==m:a-=1
    else:b-=1
print(c)

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

Solution (Python):


A, B = [int(i) for i in 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: A, B = B, A
print(A + B if A - B <= 1 else A + A - 1)

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

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

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

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

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

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

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

a, b = min(a, b), max(a, b)
sum1 = b
sum2 = max(a, b-1)
print(sum1 + sum2)

Solution (Python):
from sys import stdin






A, B = [int(x) for x in stdin.readline().rstrip().split()]

if A == B:
  print(A*2)
elif A>B:
  print(2*A-1)
else:
  print(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):
x,y = map(int, input().split())
ans = 0

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

print(ans)

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

ans = 0

for i in range(2) :
    if max(A, B) == A :
        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):
def load_input():
    a, b = list(map(int, input().split()))
    return a, b


def main():
    a, b = load_input()

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


if __name__ == '__main__':
    main()

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

ans = 0

for _ in range(2):
  ans += max(a)
  if a[0] == max(a):
    a[0] -= 1
  else:
    a[1] -= 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 = (int(i) for i in 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:
  ans=2*A
else:
  ans=max(A,B)*2 - 1
print(ans)

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

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

coin = 0
if A >= B:
    A -= 1
    coin += A+1
else:
    B -= 1
    coin += B+1
if A >= B:
    A -= 1
    coin += A+1
else:
    B -= 1
    coin += B+1

print(coin)

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

Solution (Python):
X, Y = list(map(int, input().split(' ')))
print(max(X, Y)*2-1 if abs(X-Y) >= 2 else X+Y)

Solution (Python):


def main(m):
    a, b = list(map(int, m.split(' ')))
    if a > b:
        print(int(a + max(a - 1, b)))
    else:
        print(int(b + max(a, b - 1)))
        
if __name__ == '__main__':
    try:
        m = input().strip()
        main(m)
    except EOFError:
        pass

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

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

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

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

total = 0

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

print(total)

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

Solution (Python):


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

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)

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

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

print(cnt)

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

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

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

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

print(score)

Solution (Python):




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


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

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


print(sum)

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

Solution (Python):
from sys import stdin
A,B=[int(x) for x in stdin.readline().rstrip().split()]
ans=0
ans+=max(A,B)
if A >= B:
    A=A-1
else:
    B=B-1
ans+=max(A,B)
print(ans)

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

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

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

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):
li = list(map(int,input().split()))
if li[0]==li[1]:
    print(li[0]*2)
else:
    print(max(li)*2-1)

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

print(ans)

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

X = 0
if A > B:
    X = X + A
    A = A - 1
else:
    X = X + B
    B = B - 1
X = X + max(A, B)

print(X)

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

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

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

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

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

print(max(a,b)+max(max(a,b)-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 = [int(i) for i in input().split()]

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

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

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

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

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

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

sum_ab = A + B
sum_aa = A + A-1
sum_bb = B + B-1

print(max(sum_ab, sum_aa, sum_bb))

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

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

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

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

ans=x
x-=1
ans+=max(x,y)
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):
import sys
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b = na()

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

Solution (Python):


def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  A, B = readInts()
  ans = 0
  if A >= B:
    ans += A
    A -= 1
  else:
    ans += B
    B -= 1

  ans += max(A, B)
  print(ans)

if __name__ == "__main__":
  main()

Solution (Python):
def solve():
  A, B = map(int, input().split())
  return max(A, B) * 2 - 1 if A != B else A * 2

print(solve())

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

else:
    ans+=b

print(ans)

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

print(ans)

Solution (Python):
A, B = map(int, input().split())
coin = 0
for _ in range(2):
    coin += max([A, B])
    A, B = max([A, B]) - 1, min([A, B])
print(coin)

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

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

Solution (Python):

A, B = [int(x) for x in input().split()]
if A==B:
    print(A*2)
else:
    m = max(A, B)
    print(m+m-1)

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

print(ans)

Solution (Python):
x,y = map(int,input().split())
i = 0
j = 0
for i in range(2):
    if x > y:
        j += x
        x = x - 1
    else:
        j += y
        y = y - 1

print(j)

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):
from heapq import heappush,heappop

def int_raw():
    return int(input())

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

def ints_raw():
    return list(map(int, ss_raw()))




def ans():
    A ,B = ints_raw()
    ans =0
    for i in range(2):
        if A>B:
            ans += A
            A-=1
        else:
            ans+=B
            B-=1
    return ans

print(ans())

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

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


main()

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

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

Solution (Python):

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

Solution (Python):
from sys import stdin
a, b = [int(_) for _ in stdin.readline().rstrip().split()]
if a > b:
    print(2*a-1)
elif a < b:
    print(2*b-1)
elif a==b:
    print(a+b)

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

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

sum=0

if x>y:
    sum+=x
    x-=1
else:
    sum+=y
    y-=1

if x>y:
    sum+=x
    x-=1
else:
    sum+=y
    y-=1

print(sum)

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

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

print(output)

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

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

out=0

if A>B:
    out=2*A-1
elif B>A:
    out=2*B-1
else:
    out=2*A

print(out)

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

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

Solution (Python):
A, B = map(int, input().split(" "))
lst = sorted([A, B, A-1, B-1], reverse=True)
print(sum(lst[:2]))

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

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

Solution (Python):
import numpy as np
words = lambda t : np.array(list(map(t, input().split())))
a,b = words(int)

m = max(a,b)

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

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

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

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

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

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

Solution (Python):
def main():
    A, B = [int(n) for n in input().split()]
    res = 0
    for _ 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())

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

Solution (Python):
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [A, B] = [int(input_raw[0]), int(input_raw[1])]
    s = 0
    if A >= B:
        s += A
        A -= 1
    else:
        s += B
        B -= 1
    s += max(A, B)
    print s


if __name__ == '__main__':
    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):


IA = lambda: [int(x) for x in input().split()]

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

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

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

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

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

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

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

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

max_v = max(a,b)

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

Solution (Python):
def int_raw():
    return int(input())


def ss_raw():
    return raw_input().split()


def ints_raw():
    return list(map(int, ss_raw()))


a, b = ints_raw()

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

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

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

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

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

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

if (A==B):
    print(A*2)

if (A>B):
    print(A+A-1)

if (A<B):
    print(B+B-1)

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

result = 0

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

if A < B:
    result += B
else:
    result += A

print(result)

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

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

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

Solution (Python):
import numpy as np

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

C = max(A, B)
if(C == A):
    A = A - 1
else:
    B = B - 1
D = max(A, B)
print(C + D)

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

Solution (Python):
import re
A, B = [int(item) for item in re.split(r"\s", input())]

sum = 0

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

Solution (Python):
n,m=map(int,input().split())
i=0
if n>m:
  i+=n
  n-=1
else:
  i+=m
  m-=1
print(i+max(n,m))

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

Solution (Python):
L=list(map(int,input().split()))
ans=[]
ans.append(max(L)+max(L)-1)
ans.append(sum(L))
print(max(ans))

Solution (Python):



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

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

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

Solution (Python):
A,B = map(int, input().strip().split(' '))
l = sorted([A,A-1,B,B-1])[::-1]
print(l[0]+l[1])

Solution (Python):
N,M = map(int,input().split())
num = 0
if N>M:
    num+=N
    N-=1
    if N>M:
        print(num+N)
    else:
        print(num+M)
else:
    num+=M
    M-=1
    if M>N:
        print(num+M)
    else:
        print(num+N)

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

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

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

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

x = int(max(a, b))
y = int(max(max(a, b) - 1, min(a, b)))

print(x + y)

Solution (Python):



import math


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

l = [a,a-1,b,b-1]
l = sorted(l,key=lambda x:-x)
print(sum(l[0:2]))

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

Solution (Python):
import numpy as np
from collections import defaultdict
from collections import Counter
from collections import OrderedDict


A, B = (int(i) for i in input().split())
sum1 = 0
if A < B:
    sum1 += B
    B -= 1
else:
    sum1 += A
    A -= 1
if A < B:
    sum1 += B
    B -= 1
else:
    sum1 += A
    A -= 1
print(sum1)

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

Solution (Python):
inn = input()
inn = inn.split()

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

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

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

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

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

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

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

Solution (Python):

import numpy as np
from functools import lru_cache
import time

def main(): 
    if True:
        H,W = list(map(int, input().split()))
    else:
        pass

    if H == W :
        print(H+W)
    else :
        print(max(H,W)*2-1)
if __name__ =='__main__':
    main()

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

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

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

Solution (Python):

def kakaka():
    a = list(map(int, input().split()))
    b = map(int, input().split())
    c = int(input())

def start_process():
    return
def main():
    a, b = map(int, input().split())
    if a > b:
        count = a
        a -= 1
    else:
        count = b
        b -= 1
    count += max(a, b)
    print(count)



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)

Solution (Python):
A,B = map(int,input().split())
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):
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float('inf')
MOD = 10**9+7
dy = [0,1,0,-1]
dx = [1,0,-1,0]
ddy = [0,1,1,1,0,-1,-1,-1]
ddx = [1,1,0,-1,-1,-1,0,1]

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