qyliang/CodeNanoFix huggingface dataset:
Buggy code:
#https://atcoder.jp/contests/abc124
# -*- coding: utf-8 -*-

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


Fixed code:
#https://atcoder.jp/contests/abc124
# -*- coding: utf-8 -*-

a,b = map(int,input().split())
c = max(a,b)
if a>b:
    a-=1
else:
    b-=1
c += max(a,b)
print(c)
Buggy code:
A, B = map(int,input().split())
ans = 0
for i in range(2):
  ans += max(A,B)
  if max(A) == A:
    A -= 1
  else:
    B -= 1
print(ans)

Fixed code:
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)
Buggy code:
a,b =map(int(i) for i in input().split())
if a==b:
  print(a*a)
elif a>b:
  print(2*a-1)
else:
  print(b*2-1)
    

Fixed code:
a,b =(int(i) for i in input().split())
if a==b:
  print(a*2)
elif a>b:
  print(2*a-1)
else:
  print(b*2-1)
Buggy code:
A,B=map(int,input().strip())

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

Fixed code:
A,B=map(int,input().split())

if A>B:
    print(A+A-1)
elif A<B:
    print(B+B-1)
else:
    print(A+B)
Buggy code:
a,b = list(map(int,input().split()))
if a >= b:
  print(a+a-1)
elif a <= b:
  print(b+b-1)
else:
  print(a+b)

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

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

Fixed code:
ls = list(map(int, input().split()))
if abs(ls[0]-ls[1]) <= 1:
  print(ls[0]+ls[1])
else:
  print(2*max(ls)-1)
Buggy code:
#https://atcoder.jp/contests/abc124/tasks/abc124_a

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

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

if __name__ == "__main__":
    main()

Fixed code:
#https://atcoder.jp/contests/abc124/tasks/abc124_a

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

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

if __name__ == "__main__":
    main()
Buggy code:
a,b = int(input().split())

count = 0

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

Fixed code:
a,b = map(int,input().split())

count = 0

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

if a > b :
  count += a
  a -= 1
else:
  count += b
  b -= 1
  
print(count)
Buggy code:
list = list(map(input().split(), int))
print(max([list[0]*2-1,list[0]+list[1],list[1]*2-1]))

Fixed code:
list = list(map(int, input().split()))
print(max([list[0]*2-1,list[0]+list[1],list[1]*2-1]))
Buggy code:
a,b=map(int,input().split())
if a==b:
  print(a+b)
elif a<b:
  print(b*2)
else:
  print(a*2)

Fixed code:
a, b  = map(int, input().split())
if a < b: print(2 * b - 1)
elif b < a: print(2 * a - 1)
else: print(a + b)
Buggy code:
a,b=map(int,input().split())
if a!=b:
  s=max(a,b)
  print(s*(s-1))
else:
  print(a**2)


Fixed code:
a,b=map(int,input().split())
if a==b:
  print(2*a)
else:
  print(max(a,b)*2-1)
Buggy code:
a=list(map(int, input().split()))
a.sort()
if a[1]+2>=a[0]:
    print(2*a[1]-1)
else:
    print(a[0]+a[1])


Fixed code:
a=list(map(int, input().split()))
a.sort()
if a[0]==a[1]:
    print(2*a[0])
elif a[1]+2>=a[0]:
    print(2*a[1]-1)
else:
    print(a[0]+a[1])
Buggy code:
sum = 0
A, B  = input().split(" ")
if A != int() and B != int():
    A = int(A)
    B = int(B)
    for i in range(2):
        if A > B:
            sum += A
            A -= 1
            print(sum)
        elif B > A:
            sum += B
            B -= 1
            print(sum)
        elif A==B:
            sum += A
            A -= 1
            print(sum)

Fixed code:
sum = 0
A, B  = input().split(" ")
if A != int() and B != int():
    A = int(A)
    B = int(B)
    for i in range(2):
        if A > B:
            sum += A
            A -= 1
        elif B > A:
            sum += B
            B -= 1
        elif A==B:
            sum += A
            A -= 1
    print(sum)
Buggy code:
a, b = map(int, input().split())

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

Fixed code:
a,b = map(int,input().split())

if abs(a-b)<=1:
  print(a+b)
else:
  print(max([a,b])*2-1)
Buggy code:
a,b=map(int,input().split())

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

Fixed code:
a,b = map(int,input().split())

x = 0

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

print(x)
Buggy code:
a,b = map(int,input().split())
print(max(a*2-1, a+b-2, b*2-1))

Fixed code:
a,b = map(int,input().split())
print(max(a*2-1, a+b, b*2-1))
Buggy code:
a,b=map(in,input().split())
if a>b:
	print(a*2-1)
elif a<b:
	print(b*2-1)
else:
		print(a+b)

Fixed code:
a,b=map(int,input().split())
if a>b:
	print(a*2-1)
elif a<b:
	print(b*2-1)
else:
		print(a+b)
Buggy code:
A,B = map(int,input().split())

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

Fixed code:
A,B = map(int,input().split())
 
if A>B:
	print(A*2-1)
elif A==B:
	print(A+B)
else:
	print(B*2-1)
Buggy code:
a, b = map(int, input().split())

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


Fixed code:
a, b = map(int, input().split())

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

Fixed code:
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)
Buggy code:
A,B=map(int, raw_input().split())

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


Fixed code:
A,B = map(int,input().split())
if A > B + 1:
    print(A+A-1)
elif A > B - 1:
    print(A+B)
else:
    print(B+B-1)
Buggy code:
s = input().split()

if s[0] < s[1]:
  s1 = s[0]
  s2 = s[1]
else:
  s1 = s[1]
  s2 = s[0]
  
result = 0
if (s2-s1) > 2:
  result = s2*2 - 1
else (s2-s1) = 1:
  result = s2 + s1

print(result)

Fixed code:
s = input().split()
 
if int(s[0]) < int(s[1]):
  s1 = int(s[0])
  s2 = int(s[1])
else:
  s1 = int(s[1])
  s2 = int(s[0])
  
result = 0
if (s2-s1) >= 2:
  result = s2*2 - 1
else:
  result = s2 + s1
 
print(result)
Buggy code:
a,b=map(int,input().split())
print(max(2*a-1,2*b-1,a+b)

Fixed code:
a, b = map(int, input().split())
print(max(a + b, 2 * a - 1, 2 * b - 1))
Buggy code:
buttun = list(map(int,input().split()))
coin = 0
for i in range(1):
  buttun.sort(reverse = True)
  coin +=buttun[0]
  buttun[0]-=1
print(coin)

Fixed code:
buttun = list(map(int,input().split()))
coin = 0
for i in range(2):
  buttun.sort(reverse = True)
  coin +=buttun[0]
  buttun[0]-=1
print(coin)
Buggy code:
a,b = map(int,input().split())
if abs(a-b) >= 2:
    print(max(a,b) * 2)
else:
    print(a + b)

Fixed code:
a,b = map(int,input().split())
if abs(a-b) >= 2:
    print(max(a,b) * 2 - 1)
else:
    print(a + b)
Buggy code:
a.b=list(map(int,input().split()))
if a==b:
  print(max([a,b])*2)
else:
  print(max([a,b])*2-1)

Fixed code:
a,b=list(map(int,input().split()))
print(max([a,b])*2 if a==b else max([a,b])*2-1)
Buggy code:
a=list(map(int,input().split()))
if a==b:
  print(max(a)*2)
else:
  print(max(a)*2-1)

Fixed code:
a,b=list(map(int,input().split()))
if a==b:
  print(max([a,b])*2)
else:
  print(max([a,b])*2-1)
Buggy code:
A, B = map(int,input().split())

int(A)
int(B)
sum = 0

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

print(sum)

Fixed code:
A, B = map(int,input().split())

int(A)
int(B)
sum = 0

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

print(sum)
Buggy code:
A, B = map(int, input().split())
print(max(A, B) + max(A-1, B-1))

Fixed code:
A,B = map(int,input().split())
print(max(A+A-1,B+B-1,A+B))
Buggy code:
buttons = input().split(' ')
but1 = 0
but2 = 0
a = int(buttons[0])
b = int(buttons[1])

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

if a >= b:
    but2 = a
else:
    but2 = b

print (but1 + but2)

Fixed code:
buttons = input().split(' ')
but1 = 0
but2 = 0
a = int(buttons[0])
b = int(buttons[1])

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


if a > b:
    print (a + but2) 
elif a == b:
    print(a + but2 + 1)
else:
    print(b + but2)
Buggy code:
A, B = map(int, input().split())
r =0
if A > B:
  r+=A  A-=1
else:
  r += B
  B-=1

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

Fixed code:
A, B = map(int, input().split())
r =0
if A > B:
  r+=A
  A-=1
else:
  r += B
  B-=1
 
r+=max(A,B)
print(r)
Buggy code:
A, B = map(int , input().split())

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

Fixed code:
A, B = map(int , input().split())

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

Fixed code:
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)
Buggy code:
A,B= map(int, input().split())

OnlyA = A+(A-1)

OnlyB = B+(B-1)

AaddB = A + B

print(max[OnlyA,OnlyB,AaddB])

Fixed code:
A,B= map(int, input().split())

OnlyA = A+(A-1)

OnlyB = B+(B-1)

AaddB = A + B

print(max([OnlyA,OnlyB,AaddB]))
Buggy code:
A, B = map(int, input().split())
if A>=B:
  c = A*2-1
else:
  c = B*2-1
print(c)
  


Fixed code:
A, B = map(int, input().split())
if A>B:
  c = A*2-1
elif A==B:
  c= A*2
else:
  c = B*2-1
print(c)
Buggy code:
w = input().split()

a = w[0]
b = w[1]

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

print(c)

Fixed code:
w = input().split()
 
a = int(w[0])
b = int(w[1])
 
c = 0
for i in range(2):
  if a>=b:
    c += a
    a -= 1
  else:
    c += b
    b -= 1
 
print(c)
Buggy code:
a, b = map(int, input().split())

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

Fixed code:
a, b = map(int, input().split())

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


Fixed code:
a, b = map(int, input().split())
if a == b:
    print(a*2)
elif a > b:
    print(a*2-1)
else:
    print(b*2-1)
Buggy code:
a, b = (map(int, input()))
if a == b:
    print(a * 2)
else:
    c = max(a, b)
    print(c * (c - 1))

Fixed code:
a, b = (map(int, input().split()))
if a == b:
    print(a * 2)
else:
    c = max(a, b)
    print(c * 2 - 1)
Buggy code:
a,b=map(int,input().split())
print(max(a,b)+max(max(a,b)-1,min(a,b))

Fixed code:
a, b = map(int, input().split())
print(max(a + a - 1, b + b - 1,
          a + b))
Buggy code:
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)X

Fixed code:
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)
Buggy code:
M,N = [int(x) for x in input()]
print(M+N if M==N else 2*max(M,N)-1)

Fixed code:
M,N = [int(x) for x in input().split()]
print(M+N if M==N else 2*max(M,N)-1)
Buggy code:
A, B = map(int, input().split)
sum = 0
if A < B:
  sum += B
  B = B-1
else:
  sum += A
  A = A-1

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

print(sum)

Fixed code:
A, B = map(int, input().split())
sum = 0
if A < B:
  sum += B
  B = B-1
else:
  sum += A
  A = A-1
 
if A < B:
  sum += B
  B = B-1
else:
  sum += A
  A = A-1
 
print(sum)
Buggy code:
bt = input()
bt_A, bt_B = bt.split()
bt_max, bt_min = max(bt_A, bt_B), min(bt_A, bt_B)
max_num = bt_max + max(bt_max - 1, bt_min)
print(max_num)

Fixed code:
bt = input()
bt_A, bt_B = bt.split()
bt_max, bt_min = max(int(bt_A), int(bt_B)), min(int(bt_A), int(bt_B))
max_num = bt_max + max(bt_max - 1, bt_min)
print(max_num)
Buggy code:
a = list(map(int,input().split()))
if abs(a[0]-a[1]) > 1:
  print(2*max(a))
else:
  print(a[0]+a[1])

Fixed code:
a = list(map(int,input().split()))
if abs(a[0]-a[1]) > 1:
  print(2*max(a)-1)
else:
  print(a[0]+a[1])
Buggy code:
A,B=list(map(int,input().split()))
C=0
for i in range(1):
    if A>B:
        C+=A
        A=A-1
    else:
        C+=B
        B=B-1
print(C)

Fixed code:
A,B=list(map(int,input().split()))
C=0
for i in range(2):
    if A>B:
        C+=A
        A=A-1
    else:
        C+=B
        B=B-1
print(C)
Buggy code:
a,b=map(int,input().split())

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

Fixed code:
a,b=map(int,input().split())

print(max(a-1+a,b-1+b,a+b))
Buggy code:
a = sorted(list(map(int, input().split())))
if a[2]-a[1]>=1:
  print(a[2]*2-1)
elif a[2]-a[1]=0:
  print(a[2]*2)

Fixed code:
a = sorted(list(map(int, input().split())))
if a[1]-a[0] >= 1:
  print(a[1]*2-1)
else:
  print(a[1]*2)
Buggy code:
a,b=map(int,input().split())
c=max(a,b)
if(a!=b):
    print(a+a-1)
else:
    print(a+b)

Fixed code:
a,b=map(int,input().split())
c=max(a,b)
if(a!=b):
    print(c+c-1)
else:
    print(a+b)
Buggy code:
tmp=input().sprit(" ")
a = int(tmp[0])
b = int(tmp[1])

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


Fixed code:
tmp=input().split(" ")
a = int(tmp[0])
b = int(tmp[1])

if a == b:
    print (a*2)
else:
    print (max(a,b)*2-1)
Buggy code:
A, B = (int(x) for x in input().split())

if A < B:
    print("{}".format(B + B - 1))
elif B > A:
    print("{}".format(A + A - 1))
else:
    print("{}".format(A + A))

Fixed code:
A, B = (int(x) for x in input().split())

if A < B:
    print("{}".format(B + (B - 1)))
elif A > B:
    print("{}".format(A + (A - 1)))
else:
    print("{}".format(A + A))
Buggy code:
A, B = map(int, input().split())

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

Fixed code:
A, B = map(int, input().split())

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

Fixed code:
A, B= map(int,input().split())
if A > B:
 print(A + A - 1)
elif B > A:
 print(B + B - 1)
else:
 print(A + B)
Buggy code:
a,b=[int(x) for x in input().split()]
print(max(a*2-1,b*2-1,a+b-1))

Fixed code:
a,b=[int(x) for x in input().split()]
print(max(a*2-1,b*2-1,a+b))
Buggy code:
A,B = map(int,input().split())

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

Fixed code:
A,B = map(int,input().split())

if A == B:
    print(2*A)
else:
    print(max(A,B)*2 - 1)
Buggy code:
#!/usr/bin/env python
a = input()
a = [int(i) for i in a.split()]
ret = 0
ret += max(a)
if a[0] <= a[1]:
    a[0] -= 1
else:
    a[1] -= 1
ret += max(a)
print(ret)


Fixed code:
#!/usr/bin/env python
a = input()
a = [int(i) for i in a.split()]
ret = 0
ret += max(a)
if a[0] >= a[1]:
    a[0] -= 1
else:
    a[1] -= 1
ret += max(a)
print(ret)
Buggy code:
a,b=map(int,input().split())
if a==b:
    print(2*a)
else:
    print(max(a,b)*2+1)

Fixed code:
a,b=map(int,input().split())
if a==b:
    print(a*2)
else:
    print(max(a,b)*2-1)
Buggy code:
i = list(map(int, input().split()))

if i[0] == i[1]:
    num = i[0] + i[0] - 1
else:
    max = max([i[0], i[1]])
    num = max + max-1

print(num)


Fixed code:
i = list(map(int, input().split()))

if i[0] == i[1]:
    num = i[0]*2
else:
    max = max([i[0], i[1]])
    num = max + max-1

print(num)
Buggy code:

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

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


Fixed code:

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

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


Fixed code:
A,B=map(int,input().split())
if A>B:
  print(2*A-1)
elif A==B:
  print(2*A)
else:
  print(2*B-1)
Buggy code:
a, b = map(int, input().split())
if a < b:
  swap(a, b)

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

Fixed code:
a, b = map(int, input().split())
if a < b:
  a, b = b, a

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

def main():
	A,B = map(int,input().split())
	res = A if A >= B else B
	res = A-1 if A-1>=B else B
	print(res)

if __name__ == "__main__" :
	main()

Fixed code:

def main():
	A,B = map(int,input().split())
	res = A if A >= B else B
	if res == A :
		A -= 1
	else :
		B -= 1
	res += A if A>=B else B
	print(res)

if __name__ == "__main__" :
	main()
Buggy code:
import sys
input = sys.stdin.readline
a, b = map(int, input().split())

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


Fixed code:
import sys
input = sys.stdin.readline
a, b = map(int, input().split())

print(max([2*a-1, 2*b-1, a+b]))
Buggy code:
A,B = map(int,input().split())
if A > B :
    print( 2*A - 1 )
if A == B :
    print( A + B )
else :
    print( 2*B - 1 )


Fixed code:
A, B = map(int, input().split())
if A == B:
    print(A + B)
else:
    print(max(A, B) * 2 - 1)
Buggy code:
A, B = [int(n) for n in input().split()]
ans = 0
for i in range(2):
  ans += A if A >= B else B
print(ans)


Fixed code:
A, B = [int(n) for n in input().split()]
ans = 0
for i in range(2):
    if A >= B:
        ans += A
        A -= 1
    else:
        ans += B
        B -= 1  
print(ans)
Buggy code:
a,b = map(int,input().split())
if a == b:
  print(2*a-1)
else:
  print(max(a,b)*2-1)

Fixed code:
a,b = map(int,input().split())
if a == b:
  print(2*a)
else:
  print(max(a,b)*2-1)
Buggy code:
a=list(map(int,input().split()))
if a[0]==a[1]:
  　print(2*a[0])
else:
　　print(2max(a)-1)

Fixed code:
a=list(map(int,input().split()))
if a[0]==a[1]:
    print(2*a[0])
else:
    print(2*max(a)-1)
Buggy code:
a, b = map(int, input().split())
if a>b:
    print(a+(a-1))
elif a=b:
    print(a*2)
elif a<b:
    print(b+(b-1))

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

Fixed code:
A,B = map(int,input().split())
print(max(2*A-1,2*B-1,A+B))
Buggy code:
A,B=map(int,input().split())
s=0
if A > B:
    s=A+(A-1)
elif A < B:
    s=B+(B+1)
else:
    s=A+B
print(s)

Fixed code:
A, B = map(int, input().split())
if A < B:
    print(B + B - 1)
elif A > B:
    print(A + A - 1)
else:
    print(A + B)
Buggy code:
A, B = map(int, input().split())
cnt = 0

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

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

Fixed code:
A,B=map(int,input().split())
s=0
if A > B:
    s=A+(A-1)
elif A < B:
    s=B+(B-1)
else:
    s=A+B
print(s)
Buggy code:
A, B = map(int, input().split())

inputs = [A, B]
inputs.sort()

button1 = inputs[0]
inputs[0] -= 1
inputs.sort()

button2 = inputs[0]

print(button1 + button2)

Fixed code:
A, B = map(int, input().split())

inputs = [A, B]
inputs.sort()

button1 = inputs[1]
inputs[1] -= 1
inputs.sort()

button2 = inputs[1]

print(button1 + button2)
Buggy code:
s=0
A,B=map(int,input().split())
if A>=B:
  s+=A
  A=A-1
else:
  s+=B
if A>=B:
  s+=A
  A=A-1
else:
  s+=B
print(s)

Fixed code:
s=0
A,B=map(int,input().split())
if A>=B:
  s+=A
  A=A-1
else:
  s+=B
  B=B-1
if A>=B:
  s+=A
  A=A-1
else:
  s+=B
  B=B-1
print(s)
Buggy code:
a,b=input().split()
a=int(a)
b=int(b)
if a-b>=2:
  print(2*a-1)
if b-a>=2:
  print(2*b-1)
else:
  print(a+b)

Fixed code:
a, b = map(int, input().split())
print(a + a - 1 if a > b else a * 2 if a == b else b + b - 1)
Buggy code:
A,B=map(int,input().split())
X=int(0)
for i in range(2):
    if A>B:
        X+=int(A)
        A=A-1
    else:
        X+=int(B)
        B=B-1
    print(X)


print(X)

Fixed code:
A,B=map(int,input().split())
X=int(0)
for i in range(2):
    if A>B:
        X+=int(A)
        A=A-1
    else:
        X+=int(B)
        B=B-1
  
print(X)
Buggy code:
a,b = map(int,input().split())

aa = a+a-1
bb = b+b-1
ab = a+b-1

lists = [aa,bb,ab]
print(max(lists))

Fixed code:
a,b = map(int,input().split())

aa = a+a-1
bb = b+b-1
ab = a+b

lists = [aa,bb,ab]
print(max(lists))
Buggy code:
A,B = (int(i) for i in input().split()) 

if A >= B+1 :
   print( '%d' % 2*A-1 )
elif B >= A+1 :
   print( '%d' % 2*B-1 )
else:
   print( '%d'% 2*A)

Fixed code:
A,B = (int(i) for i in input().split()) 
C=0
if A >= B+1 :
	C=2*A-1
	print( '%d' % C  )
elif B >= A+1 :
	C=2*B-1
	print( '%d' % C )
else:
	C=2*A
	print( '%d'% C)
Buggy code:
a, b = map(int, input().split())
print(sum(sorted([a, b, a-1, b-1])[:2]))

Fixed code:
a, b = map(int, input().split())
print(sum(sorted([a, b, a-1, b-1])[-2:]))
Buggy code:
a,b=map(int,input().split())
if a==b:print(a+b-2)
else:print(max(a,b)*2-1)

Fixed code:
a, b = list(map(int,input().split()))
if a == b:
  print(2 * a)
else:
  print(max(a,b) * 2 -1)
Buggy code:
A,B = map(int,input().split())
i = 0
X = 0
if(A != B):
    while i <= 1: 
        X += max(A,B)
        i += 1
    print(X-1)
else:
print(A + B)

Fixed code:
A,B = map(int,input().split())
i = 0
X = 0
if(A != B):
    while i <= 1: 
        X += max(A,B)
        i += 1
    print(X-1)
else:
    print(A + B)
Buggy code:
a,b=map(int,input());ans=0
if a<b:ans+=b;b-=1
else:ans+=a;a-=1
ans+=max(a,b)
print(ans)

Fixed code:
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)
Buggy code:
str = input().split()
A = int(str[0])
B = int(str[1])
ans = 0
 
if A> B:
  ans = ans + A
else :
  ans = ans + B
  
if A> B:
  ans = ans + A
  A = A-1
else :
  ans = ans + B
  B = B-1
  
print(ans)

Fixed code:
str = input().split()
A = int(str[0])
B = int(str[1])
ans = 0
 
if A> B:
  ans = ans + A
  A = A-1
else :
  ans = ans + B
  B = B-1
if A> B:
  ans = ans + A
else :
  ans = ans + B
  
print(ans)
Buggy code:
A, B = [int(i) for i input().split(' ')]
     
def f():
	res = 0
    if A > B and A - 1 > B:
    	res += A + A - 1
    elif B > A and B - 1 > A:
    	res += B + B - 1
    else:
    	res = A + B
    return res
f()

Fixed code:
A, B = [int(i) for i in input().split(' ')]
     
def f():
    res = 0
    if A > B and A - 1 > B:
        res = A + A - 1
    elif B > A and B - 1 > A:
        res = B + B - 1
    else:
        res = A + B
    return res
print(f())
Buggy code:
a,b=int(input().split())

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

Fixed code:
a,b = map(int,input().split())

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

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

Fixed code:
a,b = map(int,input().split())

if a > b :
    print(2*a-1)
elif b > a:
    print(2*b-1)
elif a == b:
    print(a+b)
Buggy code:
a,b=map(int,input().split())
if a==b:print(2*c)
else:print(max(a,b)+max(a-1,b-1))


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

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


Fixed code:
a,b = list(map(int, input().split()))
if a > b:
    print(2*a-1)
elif b > a:
    print(2*b-1)
else:
    print(a+b)
Buggy code:
A, B = map(int, input().split())
sum_num = 0

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

print(sum_num):


Fixed code:
A, B = map(int, input().split(' '))
sum_num = 0

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

print(sum_num)