qyliang/CodeNanoFix huggingface dataset:
Buggy code:
A,B = map(int,input().split())

scoew = 0
if A >= B:
	score = score + A
    A = A -1
else:
	score = score + B
    B = B -1

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

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

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

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

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

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

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

Fixed code:
a, b = map(int, input().split())
c, d = a-1, b-1
l = sorted([a,b,c,d])[::-1]
print(l[0]+l[1])
Buggy code:
import sys
import math
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [a, b] = string_to_int(inputs[0])

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

    return ret


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(2))
    print(ret)


Fixed code:
import sys
import math
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [a, b] = string_to_int(inputs[0])

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

    return ret


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)
Buggy code:
btns=input().split()
X=btns[0]
Y=btns[1]
Coins=0

for i in range(2):
    if X > Y:
        Coins+=X
        X -= 1
    else:
        Coins+=Y
        Y-=1

print(Coins)



Fixed code:
btns=input().split()
X=int(btns[0])
Y=int(btns[1])
Coins=0

for i in range(2):
    if X > Y:
        Coins+=X
        X -= 1
    else:
        Coins+=Y
        Y-=1

print(Coins)
Buggy code:
A, B = map(int, input().split())
ans = 0
for _ in range(2):
    if A >= B:
        ans += A
        A -= 1
print(ans)

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

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

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

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

n=0
n+=M
M-=1

n+=max(M,m)

print(n)

Fixed code:
a,b=map(int,input().split())
M=max(a,b)
m=min(a,b)

n=0
n+=M
M-=1

n+=max(M,m)

print(n)
Buggy code:
a = input().split()
b = int(d[0])
c = int(d[1])
if b > c:
	first = b
    b = b - 1
else:
	first = c
	c = c - 1
if b > c:
	second = b
else:
	second = c
answer = first + second
print(str(answer))


Fixed code:
a = input().split()
b = int(a[0])
c = int(a[1])
if b > c:
	first = b
	b = b-1
else:
	first = c
	c = c-1
if b > c:
	second = b
else:
	second = c
answer = first + second
print(str(answer))
Buggy code:
def check_max_coin(a,b):
  max_coin = 0
  for i in range(1:3):
    if a < b :
      max_coin += b 
    else:
      max_coin += a      
  print(max_coin)
  
a, b = map(int, input().split())
check_max_coin(a,b)

Fixed code:
def check_max_coin(a,b):
  max_coin = 0
  for i in range(1,3):
    if a < b :
      max_coin += b 
      b-=1 
    else:
      max_coin += a  
      a-=1    
  print(max_coin)
  
a, b = map(int, input().split())
check_max_coin(a,b)
Buggy code:
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
return (cnt)

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

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

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

if x == y:
  ans = x * 2
if x > y:
  ans = 2*x - 1
else:
  ans = 2*y - 1

print(ans)

Fixed code:
x, y = map(int,input().split())

if x == y:
  ans = x * 2
elif x > y:
  ans = 2*x - 1
else:
  ans = 2*y - 1

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

if abs(A-B)=>2:
  if A-B>0:
    ans=2*A-1
  else:
    ans=2*B-1
else:
  ans=A+B
print(ans)

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

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


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

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

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

print(sum)

Fixed code:
A, B= map(int, input().split())
sum = 0
i=0
while i < 2:
    if A >= B:
        sum += A
        A -= 1
    else:
        sum+= B
        B -= 1
    i +=1

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

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

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

print(x)

Fixed code:
a,b=map(int, input().split())
x = 0
if a>b:
  x += a
  a -=1
else:
  x += b
  b -=1

x += max(a,b)

print(x)
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 = [int(i) for i in input().split("")]
if a[0] == a[1]:
    print(2 * a[0])
else:
    print(2 * max(a) - 1)

Fixed code:
a = [int(i) for i in 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())
print(max(2*A-1, 2*B-1, A+B)

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

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


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

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

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

Fixed code:
a, b = list(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
  
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:
import sys
a, b = map(int,sys.stdin.readline().split())
if a == b:
  select_btn = a + b
else:
  select_btn = max(a, b)
print(select_btn*2-1)

Fixed code:
import sys
a, b = map(int,sys.stdin.readline().split())
total = 0
if a == b:
  total = a + b
else:
  select_btn = max(a, b)
  total = select_btn*2-1
print(total)
Buggy code:
button = map(int, input().split())
button_sort = sorted(button, reverse = True)
sum = button_sort[0]
button_sort[0] = button_sort[0] - 1
sum += button_sort[0]
print (sum)

Fixed code:
button = map(int, input().split())
button_sort = sorted(button, reverse = True)
sum = button_sort[0]
button_sort[0] = button_sort[0] - 1
button_sort = sorted(button_sort, reverse = True)
sum += button_sort[0]
print (sum)
Buggy code:
# -*- coding: utf-8 -*-
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


Fixed code:
# -*- coding: utf-8 -*-
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)
Buggy code:
a, b = map(int, input().split())

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

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

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

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

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

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

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

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


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

if(b > c):
  total = b
  b -= 1
else:
  total = c
  c -= 1

print(total)

Fixed code:
b, c = map(int, input().split())
total = 0;
if(b > c):
    total = b
    b -= 1
else:
    total = c
    c -= 1

if(b > c):
    total += b
    b -= 1
else:
    total += c
    c -= 1

print(total)
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 + max(A-1, B))
else:
    print(B + max(A, B-1))
Buggy code:
Number= list(map(int, input().split()))
Number.sort()
if Number[0] == Number[1]:
    print(Number.sum())
else:
    print(Number[1]*2 -1)

Fixed code:
Number= list(map(int, input().split()))
Number.sort()
if Number[0] == Number[1]:
    print(sum(Number))
else:
    print(Number[1]*2 -1)
Buggy code:
X, Y = map(int, input().split())
x = max(X,Y)
y = min(X, Y)
S = x + max(X-1, Y)
print(S)


Fixed code:
X, Y = map(int, input().split())
x = max(X,Y)
y = min(X, Y)
S = x + max(x-1, y)
print(S)
Buggy code:
A,B = map(int,input().split())
max(A+A-1,A+B,B+B-1)

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


Fixed code:
A,B=map(int,input().split())
coins = 0
for i in range(2):
    if A > B:
        coins += A
        A -= 1
    else:
        coins += B
        B -= 1
print(coins)
Buggy code:
#124a
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６)


Fixed code:
#124a
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)
Buggy code:
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
a,b=IL()
if a==b:
  print(a+b)
else:
  print(2*a-1)

Fixed code:
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
a,b=IL()
if a==b:
  print(a+b)
else:
  print(2*max(a,b)-1)
Buggy code:
aa, bb = list(map(int, input().split()))
if aa>bb:
    print(2*aa+1)
elif aa<bb:
    print(2*bb+1)
else:
    print(2*aa)

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

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

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

r1 = max(a,b)

if r1 == 1:
  a -= 1
else:
  b -= 1
r2 = max(a,b)

print(r1+r2)

Fixed code:
a,b = map(int, input().split())
 
r1 = max(a,b)
 
if r1 == a:
  a -= 1
else:
  b -= 1
r2 = max(a,b)
 
print(r1+r2)
Buggy code:
A,B = map(int,input().split())
tmp=0

while tmp<3:
  if A > B:
    cnt+=A
    A-=1
  elif A < B:
    cnt+=B
    B-=1
  else:
    cnt+=A
   A-=1
print(cnt)
  

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

while tmp<2:
  if A > B:
    cnt+=A
    A-=1
    tmp+=1
  elif A < B:
    cnt+=B
    B-=1
    tmp+=1
  else:
    cnt+=A
    A-=1
    tmp+=1
print(cnt)
Buggy code:
x = input().split(" ")
a = int(x[0])
b = int(x[1])

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

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

ans = 0
num = 0

while num < 2:
    if a >= b:
        ans += a
        a -= 1
    else:
        ans += b
        b -= 1
    num += 1
print(ans)
Buggy code:
A,B = map(int,input().split())
x=0
def f():
  if A>B:
    x=x+A
    A=A-1
  else:
    x=x+B
    B=B-1
    
f()
f()
print(x)



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

if A>B:
  x=x+A
  A=A-1
else:
  x=x+B
  B=B-1
  
if A>B:
  x=x+A
  A=A-1
else:
  x=x+B
  B=B-1
   
print(x)
Buggy code:
A,B = [int(input()).split]

if abs(A-B) >= 2 :
	print(A*2-1)
elif abs(A-B) = 1 :
	print(max([A,B])+min([A,B]))
else :
	print(A*2)

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

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

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

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

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

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

print(a)
print(b)
print(count)


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

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

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

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

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


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())
#lis = list(map(int,input().split()))
count = 0
if a>b:
    count += a
    a -= 1
else:
    count += b
    a -= 1
if a>b:
    count += a
    a -= 1
else:
    count += b
    a -= 1
print(count)

Fixed code:
a,b = map(int,input().split())
#lis = list(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:
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:
#coding:utf-8

if __name__ == "__main__":
    A, B = map(int, input().split())
    total = 0
    for n in range(2):
        if A < B:
            total += A
            A = A - 1
        else:
            total += B
            B = B - 1
    
    print(total)

Fixed code:
#coding:utf-8

if __name__ == "__main__":
    A, B = map(int, input().split())
    total = 0
    for n in range(2):
        if A < B:
            total += B
            B = B - 1
        else:
            total += A
            A = A - 1
    
    print(total)
Buggy code:
a,b = map(int, input().split())

total =0

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

print(total)

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

a, b = input().split()
a, b = int(a), int(b)
total = 0
if a > b :
  total = 2*a -1 

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

print(total)
  
if a == b:
  total = 2*a



Fixed code:

a, b = input().split()
a, b = int(a), int(b)
total = 0
if a > b :
  total = 2*a -1 

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


  
if a == b:
  total = 2*a

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

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


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

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

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

Fixed code:
A, B = map(int, input().split())
cnt = 0
for i in range(2):
    cnt += max(A, B)
    if A == max(A, B):
        A -= 1
    else:
        B -= 1

print(cnt)
Buggy code:
# -*- coding: utf-8 -*-

import sys
input = sys.stdin.readline

def io_generator():
	return input()

#+++++++++++++++++++

def main(io):
	a,b = map(int, io().split())
	if a==b:
		ret==2*a
	else:
		c=max(a,b)
		ret=2*c-1

	return ret

#++++++++++++++++++++

if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

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

import sys
input = sys.stdin.readline

def io_generator():
	return input()

#+++++++++++++++++++

def main(io):
	a,b = map(int, io().split())
	if a==b:
		ret=2*a
	else:
		c=max(a,b)
		ret=2*c-1

	return ret

#++++++++++++++++++++

if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))