qyliang/CodeNanoFix huggingface dataset:
Buggy code:
A,B,C = list(map(int,input().split()))
if A == B == C and A%2 == 0 :
    print(-1)
elif A == B == C and A%2 == 1 :
    print(0)
else :
    cnt=0
    while a%2==b%2==c%2==0:
        total=a+b+c
        a=total//2-a//2
        b=total//2-b//2
        c=total//2-c//2
        cnt+=1
    print(cnt)


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

cnt = 0
if A == B == C and A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    print(-1)
else:
    while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
        a = A
        b = B
        c = C
        cnt += 1
        A = (b+c) // 2
        B = (c+a) // 2
        C = (a+b) // 2
    print(cnt)
Buggy code:
ms = list(map(int,input().split()))
ans=0
if len(set(ms))==1 and ms[0]%2==0:
    print(-1)
else:
    while(not any([i%2==0 for i in ms])):
        l = [0]*3
        for i in range(3):
            x = ms[i]/2
            if i==0:
                l[1]+=x
                l[2]+=x
            elif i==1:
                l[0]+=x
                l[2]+=x
            elif i==2:
                l[0]+=x
                l[1]+=x
        ms = l[:]
        ans+=1
    print(ans)

Fixed code:
ms = list(map(int,input().split()))
if len(set(ms))==1 and ms[0]%2==0:
    print(-1)
else:
    ans=0
    while(all([i%2==0 for i in ms])):
        l = [0]*3
        for i in range(3):
            x = ms[i]/2
            if i==0:
                l[1]+=x
                l[2]+=x
            elif i==1:
                l[0]+=x
                l[2]+=x
            elif i==2:
                l[0]+=x
                l[1]+=x
        ms = l[:]
        ans+=1
    print(ans)
Buggy code:
import sys
A,B,C = map(int,input().split())
result = 0
if A == B and B == C:
  print(-1)
else:
  while A % 2 == B % 2 and B % 2 == C % 2 and C % 2 == 0:
    a = (B + C) // 2
    b = (C + A) // 2
    c = (A + B) // 2
    A,B,C = a,b,c
    result += 1
print(result)


Fixed code:
import sys
A,B,C = map(int,input().split())
result = 0
if A * B * C % 2 == 1:
  print(0)
  sys.exit()
elif A == B and B == C:
  print(-1)
  sys.exit()
else:
  while A % 2 == B % 2 and B % 2 == C % 2 and C % 2 == 0:
    a = (B + C) // 2
    b = (C + A) // 2
    c = (A + B) // 2
    A,B,C = a,b,c
    result += 1
print(result)
Buggy code:
#!/usr/bin/env python3
import sys
# input = sys.stdin.r/eadline
def INT(): return int(input())
def MAP(): return map(int,input().split())
def LI(): return list(map(int,input().split()))

def main():
    A,B,C = MAP()
    if not(A%2==0 and B%2==0 and C%2==0):
        print(0)
        return
        
    if A==B==C:
        print(-1)
        return
    answer = 0
    
    while A%2==0 and B%2==0 and C%2==0:
        x = A//2
        y = B//2
        z = C//2
        A = y+z
        B = x+y
        C = y+z
        answer += 1
    print(answer)

if __name__ == '__main__':
    main()


Fixed code:
#!/usr/bin/env python3
import sys
# input = sys.stdin.r/eadline
def INT(): return int(input())
def MAP(): return map(int,input().split())
def LI(): return list(map(int,input().split()))

def main():
    A,B,C = MAP()
    if A==B==C:
        if A%2==1 or B%2==1 or C%2==1:
            print(0)
        else:
            print(-1)
        return
    answer = 0
    
    while A%2==0 and B%2==0 and C%2==0:
        x = A//2
        y = B//2
        z = C//2
        A = y+z
        B = x+z
        C = y+x
        answer += 1
    print(answer)

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

if a == b == c and a % 2 == 0:
    print(-1)

counter = 0
while True:
    counter += 1
    w_a = a / 2
    w_b = b / 2
    w_c = c / 2

    a = w_b + w_c
    b = w_a + w_c
    c = w_b + w_a

    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(counter)
        exit(0)


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


if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
    print(0)
    exit(0)
if a == b == c and a % 2 == 0:
    print(-1)
    exit(0)

counter = 0
while True:
    counter += 1
    w_a = a / 2
    w_b = b / 2
    w_c = c / 2

    a = w_b + w_c
    b = w_a + w_c
    c = w_b + w_a

    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(counter)
        exit(0)
Buggy code:
import sys
import numpy as np
sys.setrecursionlimit(10 ** 7)

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

cookies = np.array(lr())
if len(set(cookies)) == 1:
    print(-1)
    exit()
if any(cookies&1):
    print(0)
    exit()
count = 0
half_total = cookies.sum() // 2
while True:
    cookies = half_total - cookies//2
    print(cookies)
    count += 1
    if any(cookies&1):
        print(count)
        break
    if count == 10000:
        print(-1)
        exit()


Fixed code:
import sys
import numpy as np
sys.setrecursionlimit(10 ** 7)

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

cookies = np.array(lr())
if any(cookies&1):
    print(0)
    exit()
if len(set(cookies)) == 1:
    print(-1)
    exit()

count = 0
half_total = cookies.sum() // 2
while True:
    cookies = half_total - cookies//2
    count += 1
    if any(cookies&1):
        print(count)
        break
    if count == 1000000:
        print(-1)
        exit()
Buggy code:
a,b,c = map(int,input().split())

if a%2 or b%2 or c%2:
  print(0)
  exit()
elif a==b==c:
  print(-1)
  exit()
  
ans =0
while 1:
  if all(a%2==0, b%2==0, c%2==0):
    ans += 1
  else:
    print(ans)
    exit()
  a, b, c = (b+c)//2, (a+c)//2, (b+a)//2

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

ans = 0
while 1:
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(ans)
        exit()
    if a == b == c:
        print(-1)
        exit()
    else:
        a, b, c = b // 2 + c // 2, a // 2 + c // 2, a //2 + b //2
        ans += 1
Buggy code:
a,b,c = map(int,input().split())

if any((a%2==1,b%2!==1,c%2==1)):
    print(0)
    exit()
    
cnt = 0
while cnt <= 100:
    a,b,c = (b+c)/2, (a+c)/2,(a+b)/2
    cnt += 1
    if any((a%1!=0,b%1!=0,c%1!=0)):
        print(cnt-1)
        exit()
print(-1)

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

if any((a%2==1,b%2==1,c%2==1)):
    print(0)
    exit()
    
cnt = 0
while cnt <= 100:
    a,b,c = (b+c)/2, (a+c)/2,(a+b)/2
    cnt += 1
    if any((a%1!=0,b%1!=0,c%1!=0)):
        print(cnt-1)
        exit()
print(-1)
Buggy code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

a = inpl()
cnt = 0
while True:
    for i in a:
        if i%2:
            print(cnt)
            quit()
if a[0] == a[1] == a[2]:
    print(-1)
else:
    while True:
        for i in a:
            if i%2:
                print(cnt)
                quit()
        b = [0] * 3
        b[0] = (a[1] + a[2]) // 2
        b[1] = (a[0] + a[2]) // 2
        b[2] = (a[1] + a[0]) // 2
        cnt += 1
        a[::] = b[::]



Fixed code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

a = inpl()
cnt = 0
for i in a:
    if i%2:
        print(cnt)
        quit()
if a[0] == a[1] == a[2]:
    print(-1)
else:
    while True:
        for i in a:
            if i%2:
                print(cnt)
                quit()
        b = [0] * 3
        b[0] = (a[1] + a[2]) // 2
        b[1] = (a[0] + a[2]) // 2
        b[2] = (a[1] + a[0]) // 2
        cnt += 1
        a[::] = b[::]
Buggy code:
a,b,c=map(int,input().split())
if a%2!=0 or b%2!=0 or c%2!=0:
    print(0)
else:
    a1=0
    a2=0
    a3=0
    c1=0
    c2=0
    c3=0
    ans=0
    for i in range(10**9):
        if a%2!=0:
            c1=1        
        if b%2!=0:
            c2=1        
        if c%2!=0:
            c3=1
        if c1==1 or c3==1 or c2==1:
            ans=i
            break
        else:
            a3=(a+b)//2
            a2=(a+c)//2
            a1=(b+c)//2
            a=a1
            b=a2
            c=a3
        #print(a,b,c)
        if i==199999:
            ans=-1
    print(ans)

Fixed code:
a,b,c=map(int,input().split())
if a%2!=0 or b%2!=0 or c%2!=0:
    print(0)
else:
    a1=0
    a2=0
    a3=0
    c1=0
    c2=0
    c3=0
    ans=0
    for i in range(2*10**5):
        if a%2!=0:
            c1=1        
        if b%2!=0:
            c2=1        
        if c%2!=0:
            c3=1
        if c1==1 or c3==1 or c2==1:
            ans=i
            break
        else:
            a3=(a+b)//2
            a2=(a+c)//2
            a1=(b+c)//2
            a=a1
            b=a2
            c=a3
        #print(a,b,c)
        if i==199999:
            ans=-1
    print(ans)
Buggy code:
a,b,c=map(int,input().split())
import sys
if a%2+b%2+c%2>0:
    print(0)
    sys.exit()
e=0

while e<10000:
    a,b,c=b//2+c//2,a//2+c//2,a//2+b//2
    e+=1
    print(a,b,c)
    if a%2+b%2+c%2>0:
        break

if e==10000:
    print(-1)
else:
    print(e)

Fixed code:
a,b,c=map(int,input().split())
import sys
if a%2+b%2+c%2>0:
    print(0)
    sys.exit()
e=0

while e<10000:
    a,b,c=b//2+c//2,a//2+c//2,a//2+b//2
    e+=1
    if a%2+b%2+c%2>0:
        break

if e==10000:
    print(-1)
else:
    print(e)
Buggy code:
a, b, c = map(int, input().split())

ans = 0
flag = False
while True:
    if a == b == c and a % 2 == 0:
        flag = True
        break
    elif a % 2 == b % 2 == c % 2 == 0:
        a = b//2 + c//2
        b = c//2 + a//2
        c = a//2 + b//2
        ans += 1
    else:
        break

if flag:
    print(-1)
else:
    print(ans)


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

ans = 0
flag = False
while True:
    if a == b == c and a % 2 == 0:
        flag = True
        break
    elif a % 2 == b % 2 == c % 2 == 0:
        a, b, c = b//2 + c//2, c//2 + a//2, a//2 + b//2
        ans += 1
    else:
        break

if flag:
    print(-1)
else:
    print(ans)
Buggy code:
a, b, c = map(int, input().split())
if a == b == c:
    print(-1)

for i in range(10 ** 9):
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(i)
        exit()
    a, b, c = b // 2 + c // 2, c // 2 + a // 2, a // 2 + b // 2

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

for i in range(10 ** 9):
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(i)
        exit()
    if a == b == c:
        print(-1)
        exit()
    a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2
Buggy code:
def slove():
    import sys
    input = sys.stdin.readline
    a, b, c = list(map(int, input().rstrip('\n').split()))
    if a == b == c:
        if a & 2 == 0:
            print(-1)
        else:
            print(0)
    else:
        cnt = 0
        while True:
            if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
                cnt += 1
                a, b, c = (a + b) // 2, (b + c) // 2, (a + c) // 2
            else:
                print(cnt)
                exit()


if __name__ == '__main__':
    slove()


Fixed code:
def slove():
    import sys
    input = sys.stdin.readline
    a, b, c = list(map(int, input().rstrip('\n').split()))
    if a == b == c:
        if a % 2 == 0:
            print(-1)
        else:
            print(0)
    else:
        cnt = 0
        while True:
            if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
                cnt += 1
                a, b, c = (a + b) // 2, (b + c) // 2, (a + c) // 2
            else:
                print(cnt)
                exit()


if __name__ == '__main__':
    slove()
Buggy code:
# -*- coding: utf-8 -*-
#AGC014A
import sys
#import collections

#n= int(input())
tmp = input().split()
a,b,c = list(map(lambda a: int(a), tmp))

#print(a)
#print(b)
#print(c)


count=0
while(1):
	if(a==b)and(b==c):
		if(a%2==1):
			print(0)
		else:
			print(-1)
	if(a%2==1)or(b%2==1)or(c%2==1):
		print(count)
#		print(a)
#		print(b)
#		print(c)
		sys.exit()
	a//=2
	b//=2
	c//=2
	tmp=a
	a+=b
	b+=c
	c+=tmp
	count+=1




Fixed code:
# -*- coding: utf-8 -*-
#AGC014A
import sys
#import collections

#n= int(input())
tmp = input().split()
a,b,c = list(map(lambda a: int(a), tmp))

#print(a)
#print(b)
#print(c)


count=0
while(1):
	if((a==b)and(b==c)):
		if(a%2==1):
			print(count)
			sys.exit()
		else:
			print(-1)
			sys.exit()
	if((a%2==1)or(b%2==1)or(c%2==1)):
		print(count)
#		print(a)
#		print(b)
#		print(c)
		sys.exit()
	a//=2
	b//=2
	c//=2
	tmp=a
	a+=b
	b+=c
	c+=tmp
	count+=1
Buggy code:

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

if a == b and a== c:
    print(-1)
    exit(0)
if a%2!=0 or b%2!=0 or c%2!=0:
    print(0)
    exit(0)
# a//=2
# b//=2
# c//=2
s = 0
def c2(a,b,c):
    d = -1
    if a%2!=0 or b%2!=0 or c%2!=0:
        d = 0
    a//=2
    b//=2
    c//=2
    if (b+c)%2==0 and (a+c)%2==0 and (a+b)%2==0 and d!=0:
        d =  1
    else:
        d =  0
    return (b+c), (a+c) ,(a+b) ,d

while 1:
    a,b,c,d = c2(a,b,c)
    if d == 1:
        s+=1
    else:
        break
print(s)

Fixed code:

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

s = 0
def c2(a,b,c):
    d = 1
    if a%2!=0 or b%2!=0 or c%2!=0:
        d = 0
    elif a == b and a== c:d=-1
    return (b+c)/2, (a+c)/2 ,(a+b)/2,d

while 1:
    a,b,c,d = c2(a,b,c)
    if d == 1:
        s+=1
    elif d== -1:
        s=-1
        break
    else:
        break
print(s)
Buggy code:
a,b,c= list(map(int,input().split()))
ans=1
if a==b==c:
    if a%2==0:
        print(-1)
    else:
        print(0)

else:
    for i in range(10**9+1):
        x=a
        y=b
        z=c
        a=(y+z)//2
        b=(x+z)//2
        c=(x+y)//2
        if a%2==1 or b%2==1 or c%2==1:
            print(i+1)
            break
print(-1)

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

if a == b == c and a%2==0:
    ans = -1
else:
    for i in range(10**9):
        if a%2==1 or b%2==1 or c%2==1:
            break
        x = a
        y = b
        z = c
        a = y//2 + z//2
        b = x//2 + z//2 
        c = x//2 + y//2
        ans +=1

print(ans)
Buggy code:
a,b,c=map(int,input().split())
if a==b and b==c and a%2==0:print(-1)
else:
  ans=0
  while a%2==0 and b%2==0 and c%2==0:
    a//=2;b//=2;c//=2
    ans+=1
  print(ans)

Fixed code:
a,b,c=map(int,input().split())
if a%2==b%2==c%2==0 and a==b==c:print(-1);exit()
else:
    ans=0
    while a%2==b%2==c%2==0:
        a,b,c=b//2+c//2,a//2+c//2,a//2+b//2
        ans+=1
print(ans)
Buggy code:


a, b, c = [ int(v) for v in input().split() ]

if all([a==b,b==c]):
    print(-1)

else:
    t = 0
    while:
        a, b, c = map( int,[ b/2+c/2, c/2+a/2, a/2+b/2 ] )
        t += 1

        if not all([a%2==0,b%2==0,c%2==0]):
            print(t)
            break
        if all([a==b,b==c]):
            print(-1)
            break
        

Fixed code:
a, b, c = [ int(v) for v in input().split() ]
t = 0

if not all([a%2==0,b%2==0,c%2==0]):
    print(t)
elif all([a==b,b==c]):
    print(-1)


else:
    while True:
        a, b, c = map( int,[ b/2+c/2, c/2+a/2, a/2+b/2 ] )
        t += 1

        if not all([a%2==0,b%2==0,c%2==0]):
            print(t)
            break
        elif all([a==b,b==c]):
            print(-1)
            break
Buggy code:
import numpy as np
import sys

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

three_div = [i % 2 for i in three_cookies]
if all(three_div):
    print(0)
    sys.exit()

a_b_c = np.array(three_cookies)
lis = np.array([[0, 0.5, 0.5], [0.5, 0, 0.5], [0.5, 0.5, 0]])
i = 0

while True:
    i += 1
    a_b_c = np.dot(lis, a_b_c)
    print(a_b_c)
    for j, item in enumerate(a_b_c):
        if three_cookies == a_b_c.tolist():
            print(-1)
            sys.exit()
        if item % 2 == 1:
            print(i)
            sys.exit()

Fixed code:
import numpy as np
import sys

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

three_div = [i % 2 for i in three_cookies]
if all(three_div) or any(three_div):
    print(0)
    sys.exit()

a_b_c = np.array(three_cookies)
lis = np.array([[0, 0.5, 0.5], [0.5, 0, 0.5], [0.5, 0.5, 0]])
i = 0

while True:
    i += 1
    a_b_c = np.dot(lis, a_b_c)
    #print(a_b_c)
    for j, item in enumerate(a_b_c):
        if three_cookies == a_b_c.tolist():
            print(-1)
            sys.exit()
        if item % 2 == 1:
            print(i)
            sys.exit()
Buggy code:
A,B,C = map(int,input().split())
if A==B==C:
  print(-1)
else:
  ans = 0
  while True:
    if A%2 or B%2 or C%2:
      break
    else:
      A,B,C = (B+C)//2,(A+C)//2,(A+B)//2
  print(ans)

Fixed code:
A,B,C = map(int,input().split())
if A%2==1 or B%2==1 or C%2==1:
    print(0)
elif A==B and B==C:
    print(-1)
else:
    ans = 0
    while True:
        if A%2==0 and B%2==0 and C%2==0:
            ans+=1
            A,B,C = (B+C)//2,(C+A)//2,(A+B)//2
        else:break
    print(ans)
Buggy code:
a,b,c=map(int,input().split())
n=a+b+c
if a%2==b%2==c%2==0 and (a==n/3 or b==n/3 or c==n/3):
    print(-1)
elif not a%2==b%2==c%2==0:
    print(0)
else:
    cnt=0
    while(a%2==b%2==c%2==0):
        a=(n-a)//2
        b=(n-b)//2
        c=(n-c)//2
        cnt+=1
    print(cnt)

Fixed code:
a,b,c=map(int,input().split())
n=a+b+c
if a%2==0 and a==b==c:
    print(-1)
elif not a%2==b%2==c%2==0:
    print(0)
else:
    cnt=0
    while(a%2==b%2==c%2==0):
        a=(n-a)//2
        b=(n-b)//2
        c=(n-c)//2
        cnt+=1
    print(cnt)
Buggy code:
a=list(map(int,input().split()))
b=[0,0,0]
count=0
if a[0]==a[1]==a[2]==0:
    print(-1)
else:
    while a[0]%2==a[1]%2==a[2]%2==0:
        b[0]=a[0]
        b[1]=a[1]
        b[2]=a[2]
        a[0]=a[0]+b[1]/2+b[2]/2
        a[1]=a[1]+b[0]/2+b[2]/2
        a[2]=a[2]+b[1]/2+b[0]/2
        count+=1
        print(count)

Fixed code:
a=list(map(int,input().split()))
b=[0,0,0]
count=0
if a[0]==a[1]==a[2] and a[0]%2==0:
    print(-1)
else:
    while a[0]%2==a[1]%2==a[2]%2==0:
        b[0]=a[0]
        b[1]=a[1]
        b[2]=a[2]
        a[0]=b[1]/2+b[2]/2
        a[1]=b[0]/2+b[2]/2
        a[2]=b[1]/2+b[0]/2
        count+=1
    print(count)
Buggy code:
a, b, c = [int(i) for i in input().split()]
if x%2 == 1 or y%2 == 1 or z%2 == 1:
    print(0)
elif a == b and b == c:
    print(-1)
else:
    x = a
    y = b
    z = c
    cnt = 0
    while True:
        if x%2 == 1 or y%2 == 1 or z%2 == 1:
            break
        else:
            x, y, z = y//2 + z//2, x//2 + z//2, x//2 + y//2
            cnt += 1

    print(cnt)

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


if a%2 == 1 or b%2 == 1 or c%2 == 1:
    print(0)
elif a == b and b == c:
    print(-1)
else:
    x = a
    y = b
    z = c
    cnt = 0
    while True:
        if x%2 == 1 or y%2 == 1 or z%2 == 1:
            break
        else:
            x, y, z = y//2 + z//2, x//2 + z//2, x//2 + y//2
            cnt += 1

    print(cnt)
Buggy code:
a,b,c = map(int,input().split())
ans = 0
if a == b == c and a%2 == 0:
    print(-1,-1,-1)
    exit()
while a%2 == b%2 == c%2 == 0:
    x,y,z = a//2, b//2, c//2
    a = y + z
    b = x + z
    c = x + y
    ans += 1
print(ans)

Fixed code:
a,b,c=map(int,input().split())
if a==b and a==c and a%2==0:
    print(-1)
else:
    ans=0
    while a%2==0 and b%2==0 and c%2==0:
        x=a
        y=b
        z=c
        a=(y+z)//2
        b=(x+z)//2
        c=(x+y)//2
        ans+=1
    print(ans)
Buggy code:
a,b,c = map(int,input().split())

if a == b == c:
  print(-1)
  
ans = 0
while(a%2 == b%2 == c%2 == 0):
  temp_a = (b+c)//2
  temp_b = (a+c)//2
  temp_c = (b+a)//2
  ans += 1
  a = temp_a
  b = temp_b
  c = temp_c
print(ans)

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

if a == b == c:
  if a%2 == 0:
    print(-1)
    exit()
  else:
    print(0)
    exit()
ans = 0
while(a%2 == b%2 == c%2 == 0):
  temp_a = (b+c)//2
  temp_b = (a+c)//2
  temp_c = (b+a)//2
  ans += 1
  a = temp_a
  b = temp_b
  c = temp_c
print(ans)
Buggy code:
A, B, C = map(int, input().split())

if not all([A % 2 == 0, B % 2 == 0, C % 2 == 0]):
    print(0)

elif A == B == C:
    print(-1)
else:
    cnt = 0
    while all([A % 2 == 0, B % 2 == 0, C % 2 == 0]):
        cnt += 1
        A, B, C = ((B+C)//2, (A+C)//2, (A+B)//2)
        print((A,B,C))
    print(cnt)


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

if not all([A % 2 == 0, B % 2 == 0, C % 2 == 0]):
    print(0)

elif A == B == C:
    print(-1)
else:
    cnt = 0
    while all([A % 2 == 0, B % 2 == 0, C % 2 == 0]):
        cnt += 1
        A, B, C = ((B+C)//2, (A+C)//2, (A+B)//2)
    print(cnt)
Buggy code:
A, B, C = map(int, input().split())

if any([A % 2, B % 2, C % 2]):
	print(0)
	exit()

if A == B == C:
	print(-1)
	exit()

count = 0
    while all([A % 2 == 0, B % 2 == 0, C % 2 == 0]):
        A, B, C = ((B+C)//2, (A+C)//2, (A+B)//2)
	count += 1
print(count)


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

if any([A % 2, B % 2, C % 2]):
	print(0)
	exit()

if A == B == C:
	print(-1)
	exit()

count = 0
while True:
	if any([A % 2, B % 2, C % 2]):
		break
	A, B, C = B // 2 + C // 2, A // 2 + C // 2, A // 2 + B // 2
	count += 1
print(count)
Buggy code:
a,b,c=map(int,input().split())
if a==b and b==c and a%2=0:
    print(-1)
else:
    ans=0
    while a%2==0 ans b%2==0 and c%2==0:
        tmp=a
        tmp2=b
        a=(b+c)//2
        b=(c+tmp)//2
        c=(tmp+tmp2)//2
        ans+=1
    print(ans)

Fixed code:
a,b,c=map(int,input().split())
if a==b and b==c and a%2==0:
    print(-1)
else:
    ans=0
    while a%2==0 and b%2==0 and c%2==0:
        tmp=a
        tmp2=b
        a=(b+c)//2
        b=(c+tmp)//2
        c=(tmp+tmp2)//2
        ans+=1
    print(ans)
Buggy code:
A, B, C = (int(i) for i in input().split()) 


result = 0
memory = []
while True:
    memory.append(sorted([A, B, C]))

    a = A / 2
    b = B / 2
    c = C / 2

    A = b + c
    B = a + c
    C = a + b


    for m in memory:
        l = sorted([A, B, C])
        if m[0] == l[0] and m[1] == l[1] and m[2] == l[2]:
            result = -1
    
    if result == -1:
        break



    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        break

    

print(result)




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






result = 0
memory = [[A, B, C]]
while True:
    if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
        break
    else:
        result += 1
    
    a = A / 2
    b = B / 2
    c = C / 2

    A = b + c
    B = a + c
    C = a + b

    l = sorted([A, B, C])
    for m in memory:
        if m[0] == l[0] and m[1] == l[1] and m[2] == l[2]:
            result = -1
            break
    
    if result == -1:
        break

	

    

    memory.append(l)
    

print(result)
Buggy code:
A,B,C=map(int,input().split())
if A == B == C:
	print((A % 2) - 1)
else:
	i = 0
	while (A % 2) == (B%2) == (C%2==0):
		A,B,C = (B/2) + (C/2), (C/2) + (A/2), (A/2) + (B/2)
		i += 1
	print(i)


Fixed code:
A,B,C=map(int,input().split())
i = 0
if A==B==C:
	print(-1+(A%2))
else:
	i = 0
	while A%2==B%2==C%2==0:
		A,B,C = B//2+C//2, C//2+A//2, A//2+B//2
		i += 1
	print(i)
Buggy code:
A,B,C = map(int,input().split())
if A==B==C:
  print(-1)
else:
  ans = 0
  while True:
    if A%2 or B%2 or C%2:
      break
    else:
      A //=2
      B //=2
      C //=2
  print(ans)

Fixed code:
A,B,C = map(int,input().split())
if A==B==C:
  if A%2:
    print(0)
  else:
    print(-1)
else:
  ans = 0
  while True:
    if A%2 or B%2 or C%2:
      break
    else:
      A,B,C = (B+C)//2,(A+C)//2,(A+B)//2
      ans += 1
  print(ans)
Buggy code:
A,B,C = list(map(int,input().split()))

if A == B and A == C:
  print(-1)
  exit(
else:
  cnt = 0
  while True:
    if A%2==0 and B%2==0 and C%2==0:
      A,B,C = (B+C)//2,(A+C)//2,(A+B)//2
      cnt += 1
      continue
    else:
      break
      
print(cnt)

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

if A == B and A == C:
  if A%2==0:
    print(-1)
  else:
    print(0)
  exit()
else:
  cnt = 0
  while True:
    if A%2==0 and B%2==0 and C%2==0:
      A,B,C = (B+C)//2,(A+C)//2,(A+B)//2
      cnt += 1
      continue
    else:
      break
      
print(cnt)