qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a=list(input().split())
b=int(a[0])
c=int(a[1])
if b>c:
  print(b+(b-1))
elif c>b:
  print(c+(c-1))
elif b=c:
  print(2*b)

Fixed code:
a=list(input().split())
b=int(a[0])
c=int(a[1])
if b>c:
  print(b+(b-1))
elif c>b:
  print(c+(c-1))
elif b==c:
  print(2*b)
Buggy code:
a, b = map(int, input().split())
print(max(2 * a - 1, 2 * b - 1, a + 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())
ans = 0
for i in range(2):
  if A < B:
    B -= 1
    ans += B
  else:
    A -= 1
    ans += A
print(ans)

Fixed code:
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)
Buggy code:
a,b = map(int,input())
point = 0
point += max(a,b)

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

Fixed code:
a,b = map(int,input().split())
point = 0
point += max(a,b)

if max(a,b) == a:
  point += max(a-1,b)
  print(point)
else:
  point += max(a,b-1)
  print(point)
Buggy code:
a,b = (int(i) for i in input().split()) 
if a == b:
  print(a + b):
else:
  s = max(a, b)
  print(s + s -1)

Fixed code:
a,b = (int(i) for i in input().split()) 
if a == b:
  print(a + b)
else:
  s = max(a, b)
  print(s + s -1)
Buggy code:
total=0
A,B = map(int,input().split(" "))
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
print(total)

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


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

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

Fixed 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)
Buggy code:
def main():
    A, B = map(int, input())
    if A == B:
        M = A + B
    elif A > B:
        M = A + (A - 1)
    else:
        M = B + (B - 1)
    print(M)

if __name__ == "__main__":
    main()


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

if __name__ == "__main__":
    main()
Buggy code:
arr = (input()).split()

for i,temp in enumerate(arr):
  arr[i] = int(arr[i])
  
result = 0
for i in range(2):
  result += max(arr)
  index = arr.index(mac(arr))
  arr[index] = arr[index] -1
  
print(result)

Fixed code:
arr = (input()).split()

for i,temp in enumerate(arr):
  arr[i] = int(arr[i])
  
result = 0
for i in range(2):
  result += max(arr)
  index = arr.index(max(arr))
  arr[index] = arr[index] -1
  
print(result)
Buggy code:
a,b=map(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:
x=list(map(int,input().split()))
x.sort()
if x[0]-x[1]>=2:
  print(2*x[0])
else:
  print(x[0]+x[1])

Fixed code:
x=list(map(int,input().split()))
x.sort(reverse=True)
if x[0]-x[1]>=2:
  print(2*x[0]-1)
else:
  print(x[0]+x[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, a+b, b+b-1))
Buggy code:
A,B=(int(x) for x in input().split())
coin=0
for i in range(0,2):
    pre=max(A,B)
    coin+=pre
    if(pre==A):
        A-=1
    else:
        B-=1

Fixed code:
A,B=(int(x) for x in input().split())
coin=0
for i in range(0,2):
    pre=max(A,B)
    coin+=pre
    if(pre==A):
        A-=1
    else:
        B-=1
print(coin)
Buggy code:
read = input
A,B = map(int , read().split())
if A > B:
    A,B = B,A
if A == B:
    print(A*2)
else :
    print(B*2 + 1)

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

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

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

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

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


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

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

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

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


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

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

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


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


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

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

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

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

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

max_v = max(a,b)

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


Fixed code:
a,b=map(int,input().split())
print(max(a+b,max(a,b)+max(a-1,b-1)))
Buggy code:
def main():
    a, b = map(int, input().split())

    ans = 0

    if a == b:
        ans = a * 2
    else:
        ans = a * 2 - 1

    print(ans)

if __name__ == '__main__':
    main()

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

Fixed code:
A, B = map(int, input().split(" "))
print(max(A, B) + min(max(A - 1, B), max(A, B - 1)))
Buggy code:
a=list(map(int,input().split(" ")))
x,y=sorted(a)
print(x,y)
if(y-1>x):
    print(y+y-1)
else:
    print(y+x)



Fixed code:
a=list(map(int,input().split(" ")))
x,y=sorted(a)
if(y-1>x):
    print(y+y-1)
else:
    print(y+x)
Buggy code:
a, b = map(int, input().split())

n = 2
total = 0
while n > 0:
  if a > b:
    total=total+a
  else:
    total=total+b
  n-=1
print(total)

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

n = 2
total = 0
while n > 0:
  if a > b:
    total=total+a
    a-=1
  else:
    total=total+b
    b-=1
  n-=1
print(total)
Buggy code:
a,b=[int(i) for i in input().split()]
if a==b:
  print(a**2)
else:
  print(max(a,b)*max(a-1,b-1))

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

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

print(n)

Fixed code:
a,b = map(int, input().split( ))
n = 0
if a > b:
    n += a
    a -= 1
else:
    n += b
    b -= 1
    
if a > b:
    n += a
    print(n)
else:
    n += b
    print(n)
Buggy code:
a,b=map(int,input())
c=[a,b,a-1,b-1];c.sort()
print(sum(c[-2:]))

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

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

if a >= b:
    tmp1 = a
    a -= 1
else:
    tmp2 = b
    b -= 1

if a >= b:
    tmp2 = a
else:
    tmp2 = b

print(tmp1 + tmp2)


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

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

if a >= b:
    tmp2 = a
else:
    tmp2 = b

print(tmp1 + tmp2)
Buggy code:
buttons = list(map(int, input().split()))

ans = 0
ans_list = []

ans_list.append(2 * buttons[0] - 1)
ans_list.append(2 * buttons[1] - 1)
ans_list.append(buttons[0] + buttons[1] - 1)
print(max(ans_list))


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

ans = 0
ans_list = []

ans_list.append(2 * buttons[0] - 1)
ans_list.append(2 * buttons[1] - 1)
ans_list.append(buttons[0] + buttons[1])
print(max(ans_list))
Buggy code:
a, b = int(input().split())

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

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

Fixed code:
A,B=map(int,input().split())
if A>B:
  print(2*A-1)
if A<B:
  print(2*B-1)
if A==B:
  print(A+B)
Buggy code:
a_bt, b_bt = map(int, input().split())
result = a_bt > b_bt
sum = a_bt if result else b_bt
result = a_bt - 1 > b_bt if result else a_bt > b_bt - 1
sum += a_bt - 1 if result else b_bt - 1

print(sum)


Fixed code:
a_bt, b_bt = map(int, input().split())
result = a_bt > b_bt
sum = a_bt if result else b_bt
a_bt = a_bt - 1 if result else a_bt
b_bt = b_bt - 1 if not result else b_bt
result = a_bt > b_bt
sum += a_bt if result else b_bt

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

Fixed code:
# A
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(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)
else:
  print(2*b+1)

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

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

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

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

res = 0

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

print(res)

Fixed code:
A, B = map(int, input().split())
 
res = 0
 
if A > B:
  res = A + (A-1)
elif A == B:
  res = A + B
else:
  res = B + (B-1)
 
print(res)
Buggy code:
a, b = map(int, input().split())
result_a = a + a - 1
result_b = b + b - 1
result_a_b = a + b
if result_a > result_b:
    if result_a > result_a_b:
        print(result_a)
elif result_b > result_a:
    if result_b > result_a_b:
        print(result_b)
else:
    print(result_a_b)

Fixed code:
a, b = map(int, input().split())
result_a = a + a - 1
result_b = b + b - 1
result_a_b = a + b
if (result_a_b >= result_a) and (result_a_b >= result_b):
    print(result_a_b)
elif (result_a >= result_b) and (result_a >= result_a_b):
    print(result_a)
elif (result_b >= result_a) and (result_b >= result_a_b):
    print(result_b)
Buggy code:
A,B = map(int,input().split())
A,B = map(int,input().split())
if B < A:
    n = A
    A -= 1
else:
    n = B
    B -= 1
if B < A:
    n += A
else:
    n += B

print(n)

Fixed code:
A,B = map(int,input().split())
if B < A:
    n = A
    A -= 1
else:
    n = B
    B -= 1
if B < A:
    n += A
else:
    n += B

print(n)
Buggy code:
a,b = map(int, inptu().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:
# -*- coding: utf-8 -*-
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
res = 0
res += a if a > b else b
res += a if a > b else b
print("{}".format(res - 1))


Fixed code:
# -*- coding: utf-8 -*-
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
res = 0
if a > b:
    res += a
    a -= 1
else:
    res += b
    b -= 1
res += a if a > b else b
print("{}".format(res))
Buggy code:
i, j = map(int, input().split())
print(max(i + j, i * 2 - 1, j * 2 - 1)

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

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

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


Fixed code:
a, b = map(int, input().split())
if a == b:
    print(2*a)
else:
    print(max(a, b)*2-1)
Buggy code:
AB = list(map(int,input().split()))
m2 = 2*max(AB)-1
two = sum(AB)
if m2>=two:
    print(max2)
else:
    print(two)

Fixed code:
AB = list(map(int,input().split()))
m2 = 2*max(AB)-1
two = sum(AB)
if m2>=two:
    print(m2)
else:
    print(two)
Buggy code:
a,b=map(int,input().split())
print(max(a,b)+print(max(max(a,b)-1,min(a,b)))

Fixed code:
a,b=map(int,input().split())
print(max(a,b)+max((max(a,b)-1),min(a,b)))
Buggy code:
a,b=map(int,input().split())
if a<b:
  a,b=b,a
ans=a
a-=1
if a<b:
  a,b=b,a
ans+=a

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

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

A, B, result_1 = button(A, B)
A, B, result_2 = button(A, B)

print(result_1 + result_2)

Fixed code:
A, B = list(map(int,input().split()))
def button(A, B):
  if A > B:
    result = A
    return([A - 1, B, result])
  elif A == B:
    result = A
    return([A - 1, B, result])
  else:
    result = B
    return([A, B - 1, result])
 
A, B, result_1 = button(A, B)
A, B, result_2 = button(A, B)
 
print(result_1 + result_2)
Buggy code:
a,b=list(map(int,input().split()))
if a==b:
    print(a*2-1)
else:
    if a<b:
        print(a*2-1)
    else:print(a*2-1)

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

Fixed code:
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)
Buggy code:
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)

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


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


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

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

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

Fixed code:
a,b=map(int,input().split())
if a==b:
  print(2*a)
else:
  if a<b:
    print(b+(b-1))
  else:
    print(a+(a-1))
Buggy code:
>|python|
# -*- coding: utf-8 -*-

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

Fixed code:
# -*- coding: utf-8 -*-

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

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

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

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

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


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

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

# x = sorted([a, b, a - 1, b - 1], reverse=True)
# print(x[0] + x[1])

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

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

# x = sorted([a, b, a - 1, b - 1], reverse=True)
# print(x[0] + x[1])

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

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

c= int(a)+int(b)
d= int(a)-1 + int(a)
e =int(b)-1 + int(b)

if c > d:
    if c > e:
        print(e)
    else:
        print(e)
else:
    if d > e:
        print(d)
    else:
        print(e)




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

c= int(a)+int(b)
d= int(a)-1 + int(a)
e =int(b)-1 + int(b)

if c > d:
    if c > e:
        print(c)
    else:
        print(e)
else:
    if d > e:
        print(d)
    else:
        print(e)
Buggy code:
arr = input().split(" ")
A = int(arr[0])
B = int(arr[1])

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

Fixed code:
arr = input().split(" ")
A = int(arr[0])
B = int(arr[1])

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

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

print(max(a+b,a+a-1,b+b-1))
Buggy code:
A = list(map(int, input().split()))

A = sorted(A)
ans = 0
ans += A[0]
A[0] -= 1
A = sorted(A)
ans += A[0]
print(ans)

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

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

Fixed code:
def button(a,b):
    if a==b:
        return int(a)+int(b)
    else:
        return 2*int(max(a,b))-1
a,b = map(int, input().split())
print(button(a,b))
Buggy code:
a, b = [int(i) for i in input().split()]
if(a == b):
  c = a * 2
else:
  c = max(a,b) * 2 - 1

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

if(a == b):
  c = a * 2
else:
  c = max(a, b) * 2 - 1
print(c)
Buggy code:
line = raw_input()
lines = line.split()
a = int(lines[0])
b = int(lines[1])
res = 0
if a > b:
  res = a + a - 1
elif b > a:
  res = b + b - 1
else:
  res = a + b

print(res)

Fixed code:
line = input()
lines = line.split()
a = int(lines[0])
b = int(lines[1])
res = 0
if a > b:
  res = a + a - 1
elif b > a:
  res = b + b - 1
else:
  res = a + b

print(res)
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)
else:
	if a == b:
		print(a + b)
	else:
		print(b + 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())
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, input().split())
c=0
if max(A, B) -2 >= min(A,B):
  c = max(A,B) + max(A,B) - 1
else:
  c = sum(A,B)
print(c)

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