peterverebics/CodeNet_Python_118 huggingface dataset:
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

a, b, c = inintm()

if a == b == c:
    print(-1)
    exit()

ans = 0

while a % 2 == b % 2 == c % 2 == 0:
    d = a
    e = b
    f = c
    a = e/2 + f/2
    b = d/2 + f/2
    c = d/2 + e/2
    ans += 1

print(ans)
a,b,c = map(int,input().split())
for i in range(600):
  if a == b and b == c:
    break
  a,b,c = a//2, b//2, c//2
  a, b, c = b + c, a + c, a + b
ans = i if i < 600 else -1
print(ans)
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
    count += 1
    if any(cookies&1):
        print(count)
        break
    if count == 1000000:
        print(-1)
        exit()
a, b, c = map(int, input().split())

if a == b == c:
    print(-1)
    exit()

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

N = (a + b + c) // 3
cnt = 1
while N:
    if N % 2 != 0: break
    N //= 2
    cnt += 1

print(cnt)
import sys
a,b,c = map(int,input().split(" "))
li = [[a,b,c]]
count = 0
for i in range(100):
  a2 = a/2
  b2 = b/2
  c2 = c/2
  a = b2+c2
  b = c2+a2
  c = a2+b2  
  count += 1
  if (a % 2)==1 or (b % 2)==1 or (c % 2)==1:
    break
  elif [a,b,c] in li:
    print(-1)
    sys.exit()
  else:
    li.append([a,b,c])
    
print(count)
def main():
    A, B, C = map(int, input().split())

    ans = 0
    if (2 * A - B - C) == 0 and (2 * B - A - C) == 0 and (2 * C - A - B) == 0:
        print(-1)
    else:
        for i in range(10**7):
            if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
                print(ans)
                exit()

            A, B, C = (B + C)//2, (A + C)//2, (A + B)//2
            ans += 1

if __name__ == "__main__":
    main()
A,B,C = map(int,input().split())
cnt = 0
if A == B:
	if B == C:
		print(-1)
		exit()
while True:
	if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
		break
	a = A / 2
	b = B / 2
	c = C / 2
	A = b + c
	B = a + c
	C = a + b
	cnt+=1
print(cnt)
a, b, c = map(int, input().split())
if a == b == c:
  if a % 2 == 0:
    print(-1)
  else:
    print(1)
else:
  ans = 0
  while a % 2 != 0 or b % 2 != 0:
    a1 = a
    b1 = b
    c1 = c
    a = (b1+c1)/2
    b = (a1+c1)/2
    c = (a1+b1)/2
    ans += 1
  print(ans)
a,b,c=list(map(int,input().split()))
n=0
H=[]
while True:
  S=[a,b,c]
  if S in H:
    print("-1")
    exit()
  H.append(S)
  if a%2!=0 and b%2!=0 and c%2!=0:
    print(n)
    exit()
  else:
    A=a/4
    B=b/4
    C=c/4
    a=a/2+B+C
    b=b/2+A+C
    c=c/2+A+B
    n+=1
A, B, C = map(int, input().split())
X = (A|B|C)^(A&B&C)
ans = (X&-X).bit_length()-1
print(ans)
A, B, C = map(int,input().split())

if A == B == C == 1:
    print(0)

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

LA = []
LB = []
LC = []
LA.append(A)
LB.append(B)
LC.append(C)
i = 0
cnt = 0

while LA[i] % 2 == 0 and LB[i] % 2 == 0 and LC[i] % 2 == 0:
    LA.append((LB[i]+LC[i])/2)
    LB.append((LC[i]+LA[i])/2)
    LC.append((LA[i]+LB[i])/2)
    i += 1
    cnt += 1

print(cnt)
a,b,c = map(int,input().split())
if a == b == c:
  if a%2 == b%2 == c%2 == 0:
    print(-1)
  else:
    print(0)
t = 0
while t > -1:
  if a%2 == 1 or b%2 == 1 or c%2 == 1:
    break
  (a,b,c) = ((b+c)//2,(a+c)//2,(a+b)//2)
  t += 1
print(t)
A, B, C = map(int, input().split())

if A == B and B == C:
    print(-1)
elif A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
    print(0)
else:
    step = 0
    while True:
        step += 1
        nA = B // 2 + C // 2
        nB = A // 2 + C // 2
        nC = A // 2 + B // 2
        A, B, C = nA, nB, nC
        if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
            print(step)
            break
x,y,z = map(int,input().split())

ans = 0

s = []

while True:
    x,y,z = y//2+z//2,x//2+z//2,x//2+y//2
    if x%2 == 0 and y%2 == 0 and z%2 == 0:
        ans += 1
        if [x,y,z] in s:
            print(-1)
            break
        else:
            s.append([x,y,z])
    else:
        print(ans+1)
        break
    if tuple([x,y,z]) in s:
        print(-1)
        break
A,B,C=map(int,input().split())
if (A==B)and(B==C):
    print("-1")
else:
    count=0
    while True:
        if (A%2==0)and(B%2==0)and(C%2==0):
            a=(B+C)/2
            b=(A+C)/2
            c=(A+B)/2
            A=a
            B=b
            C=c
            count=count+1
        else:
            break
    print(count)
a,b,c = map(int,input().split())
acnt = 0
bcnt = 0
ccnt = 0
cnt = 0

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

while acnt%2 != 1 and bcnt%2 != 1 and ccnt%2 != 1:
    cnt += 1
    acnt = (b+c)//2
    bcnt = (a+c)//2
    ccnt = (a+b)//2
    a = acnt
    b = bcnt 
    c = ccnt

print(cnt)
x, y, z = map(int,input().split())
a =[x]
b =[y]
c =[z]
if a[0] == b[0] == c[0]:
    print('-1')
    exit()
for i in range(10):
    if a[i] % 2 == 0 and b[i] % 2 == 0 and c[i] % 2 == 0:
        a.append((b[i] + c[i]) // 2)
        b.append((a[i] + c[i]) // 2)
        c.append((b[i] + a[i]) // 2)
    
    else:
        print(i)
        exit()
a,b,c = map(int,input().split())
count = 0
if a == b == c :
  print(-1)
else:
  while a%2 == 1 or b%2 == 1 or c%2 == 1:
    a1 = a
    b1 = b
    c1 = c
    a = a1//2 + b1//2 + c1//2
    b = a1//2 + b1//2 + c1//2
    c = a1//2 + b1//2 + c1//2
    count += 1
  print(count)
A,B,C = map(int,input().split())
if A == B and  B == C and C == A:
  print(-1)
else:
  count = 0
  while(A%2==0 and B%2 == 0 and C%2==0):
    A_ = A
    B_ = B
    A = (B+C)/2
    B = (A_+C)/2
    C = (A_+B_)/2
    count+=1
  print(count)
a, b, c = map(int, input().split())
if (a+b)%4 == (b+c)%4 == (c+a)%4 == 0:
    print(-1)
else:
    counter = 0
    while a%2==b%2==c%2==0:
        a, b, c = (b+c)//2, (a+c)//2, (a+b)//2
        counter += 1
    print(counter)
A,B,C = map(int,input().split())
ans = 0
if A == B == C:
  print(-1)
else:
  while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    n_A = (B + C) / 2
    n_B = (A + C) / 2
    n_C = (A + B) / 2
    A = n_A
    B = n_B
    C = n_C
    print(A,B,C)
    ans += 1
  print(ans)
A,B,C = map(int,input().split())
ans = 0

if A == B and B == C:
  print(-1)
  exit()
  
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
  A,B,C = (B+C)//2,(C+A)//2,(A+B)//2
  ans += 1
  
  if A == B and B == C:
    print(-1)
    exit()
    
print(ans)
A,B,C = map(int,input().split())
cnt=0

if A==B==C:
  cnt=-1
else:
  while A%2==0 and B%2==0 and C%2==0:
    s=A//2
    t=B//2
    u=C//2
    A=t+u
    B=u+s
    C=s+t
    cnt +=1
    
print(cnt)
import sys

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

if A == B and B == C:
    print('-1')
    sys.exit()

count = 0
while True:
    a = B//2 + C//2
    b = C//2 + A//2
    c = A//2 + B//2
    count += 1
    if a == b and b == c:
        print('-1')
        sys.exit()
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        break
    A = a
    B = b
    C = c

print(count)
a, b, c = map(int, input().split())
if a == b and b == c:
  if a%2 == 0:
    print(-1)
  else:
    print(0)
else:
  ans = 0
  while a % 2 == 0 and b % 2 == 0:
    a1 = a
    b1 = b
    c1 = c
    a = (b1+c1)/2
    b = (a1+c1)/2
    c = (a1+b1)/2
    ans += 1
  print(ans)
import copy
a,b,c = map(int,input().split())
cnt = 0
while 1:
    cnt += 1 
    next_a = b // 2 +  c // 2
    next_b = a // 2 + c // 2
    next_c = a // 2 + b // 2
    if a == next_a and b == next_b and c == next_c:
        print(-1)
        break
    elif (next_a % 2 == 1) or (next_b % 2 == 1) or (next_c % 2 == 1):
        print(cnt)
        break
    a = copy.deepcopy(next_a)
    b = copy.deepcopy(next_b)
    c = copy.deepcopy(next_c)
a,b,c=map(int,input().split())
ab,bc,ca=abs(a-b),abs(b-c),abs(c-a)
ans=0
if a==b==c:
  print(-1)
else:
  while ab%2==0 and bc%2==0 and ca%2==0:
    ab//=2
    bc//=2
    ca//=2
    ans+=1
  print(ans)
A,B,C=map(int,input().split())
ans=0

if A==B and B==C:
  ans=-1
  pass
else:
  while True:
    if A%2!=0 or B%2!=0 or C%2!=0:
      break

    A,B,C=B/2+C/2,A/2+C/2,A/2+B/2
    ans+=1

print(ans)
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(10**6)

def solve(a,b,c,counter=0):
    if a == b == c:
        return -1
    elif a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        return counter
    else:
        return solve((b+c)//2,(c+a)//2,(a+b)//2,counter+1)


def main():
    A, B, C = map(int,input().split())
    print(solve(A,B,C))

if __name__ == '__main__':
    main()
# おっぱっぴー

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

if A == B == C:
    print(-1)
for i in range(100):
    A, B, C = B/2+C/2, A/2+C/2, A/2+B/2

    if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
        print(i+1)
        break
A, B, C = map(int, input().strip().split())
def f(a):
  if a % 4 == 0:
    return 2
  elif a % 2 == 0:
    return 1
  else:
    return 0

if f(A) == 0 or f(B) == 0 or f(C) == 0:
  print(0)
elif f(A) == 1 or f(B) == 1 or f(C) == 1:
  print(1)
else:
  print(-1)
a,b,c=map(int,input().split())
if a==b and a==c:
    ans=-1
for i in range(1,100000):
    x=a//2
    y=b//2
    z=c//2
    a=y+z
    b=x+z
    c=x+y
    print("{}-{}-{}".format(a,b,c))
    if a%2==1 or b%2==1 or c%2==1:
        ans=i
        break
print(ans)
#!/usr/bin/env python3
a, b, c = map(int, input().split())
if (a + b + c) % 2 != 1:
    print(-1)
else:
    cnt = 0

    while True:
        if a % 2 or b % 2 or c % 2:
            break
        cnt += 1
        a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2
    print(cnt)
a, b, c = map(int, input().split())
t = 0
if a == b == c:
  print(-1)

else:
  while (a % 2 + b % 2 + c % 2) == 0:
    a, b, c = (b + c) / 2, (a + c) / 2, (a + b) / 2
    t += 1

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

if a== b and b==c and c==a :
    print(-1)
else:
    count = 0 
    while(a%2==0 and b%2==0 and c%2 ==0):
        new_a, new_b, new_c = b//2 + c//2, a//2 + c//2, a//2 + b//2
        a, b, c = new_a, new_b, new_c
        count+=1
    print(count)
l = list(map(int,input().split()))
ans = 0
if l[0] == l[1] == l[2]:
  print(-1)
  exit()
while all(i % 2 == 0 for i in l):
  a = l[0]//2; b = l[1]//2; c = l[2]//2;
  l[0] = b + c
  l[1] = a + c
  l[2] = a + b
  ans += 1
print(ans)
a, b, c = [int(i) for i in input().split()]

cnt = 0
history = set()
while True:
  print(a, b, c, "-", cnt, history)
  if (a, b, c) in history:
    print(-1)
    exit(0)
  if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
    print(cnt)
    exit(0)
  a, b, c = sorted([a, b, c])
  history.add((a, b, c))
  na = b // 2 + c // 2
  nb = a // 2 + c // 2
  nc = a // 2 + b // 2
  a = na
  b = nb 
  c = nc
  cnt += 1
a,b,c = map(int,input().split())
acnt = 0
bcnt = 0
ccnt = 0
cnt = 0

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

while acnt%2 == 0 and bcnt%2 == 0 and ccnt%2 == 0:
    cnt += 1
    acnt = (b+c)//2
    bcnt = (a+c)//2
    ccnt = (a+b)//2
    a = acnt
    b = bcnt 
    c = ccnt

print(cnt)
A, B, C = map(int, input().split())
if A == B == C:
  print(-1)
else:
  count = 0
  while 0 == A % 2 == B % 2 == C % 2:
    _A = (B + C) // 2
    _B = (C + A) // 2
    _C = (A + B) // 2
    A = _A
    B = _B
    C = _C
    count += 1
    # print("A: {}, B: {}, C: {}".format(A, B, C))
  print(count)
a, b, c = map(int, input().split())
cnt = 0
total = a + b + c
while a % 2 == 0 or b % 2 == 0 or c % 2 == 0:
    if a == (total - a) // 2:
        cnt = -1
        break
    a = (total - a) // 2
    b = (total - b) // 2
    c = (total - c) // 2
    cnt += 1
print(cnt)
A,B,C =map(int,input().split())
con = 0
 
if A == B and B == C:
  print(-1)
  exit()
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
  con += 1
  D = A / 2
  E = B / 2
  F = C / 2
  A = E + F
  B = D + F
  C = D + E
  
print(con)
a,b,c=map(int,input().split())
cnt=0
if a==b==c or a%2==b%2==c%2==1:
  print(-1)
  exit()
while a%2==b%2==c%2==0:
  a,b,c=(b+c)/2,(a+c)/2,(a+b)/2
  cnt+=1
print(cnt)
a,b,c = map(int,input().split())
i=0
if a==b==c :
	print("-1")
else:
    while a%2==0 and b%2==0 and c%2==0:
        a/2
        b/2
        c/2
        i+=1
          
print(i)
A,B,C = map(int,input().split())
count = 0
while A%2 == 0 and B%2 == 0 and C%2 == 0 and count < 10**5:
  A_copy = A
  B_copy = B
  A = (B+C)/2
  B =(A_copy+C)/2
  C = (A_copy+B_copy)/2
  count += 1
if count == 10**5-1:
  print(-1)
else:
  print(count)
a, b, c = map(int,input().split())
count = 0
def exchange(a, b, c, count):
    a, b, c = int((b+c)/2), int((a+c)/2), int((a+b)/2)
    count += 1
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        return a, b, c, count
    else:
        return exchange(a, b, c, count)
if a == b == c:
    print("-1")
else:
    aa, bb, cc, count = exchange(a, b, c, count)
    print(count)
A,B,C = map(int, input().split())
result = 0

if A == B == C:
  result = -1
else:
  while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    result += 1
    a = A/2
    b = B/2
    c = C/2
    A = b + c
    B = a + c
    C = b + a
   
print(result)
*l, = map(int, input().split())

ans = 0
while True:
    a = (l[1] + l[2]) // 2
    b = (l[0] + l[2]) // 2
    c = (l[0] + l[1]) // 2
    if l == [a, b, c]:
        ans = -1
        break
    l = [a, b, c]
    ans += 1
    if a%2 or b%2 or c%2:
        break

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

count = 0
if a==b==c:
    print(-1)
else:
    while a%2 == 0 and b%2 == 0 and c%2 == 0:
        a, b, c = b//2+c//2, c//2+a//2, a//2+b//2
        count += 1
    print(count)
# -*- coding: utf-8 -*-

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

ans=0
while True:
    if a==b==c:
        ans=-1
        break
    if a%2==1 or b%2==1 or c%2==1:
        break
    ans+=1
    na=(b+c)/2
    nb=(c+a)/2
    nc=(a+b)/2
    a=na
    b=nb
    c=nc
print(ans)
def check(A,B,C):
  if A==0 or B==0 or C==0:
    return False
  if A%2!=0 or B%2!=0 or C%2!=0:
    return False
  return True

A,B,C=map(int,input().split())
ans=0
if A==B==C:
  print(-1)
  exit()
while check(A,B,C)==True:
  a=B//2+C//2
  b=A//2+C//2
  c=A//2+B//2
  A,B,C=a,b,c
  print(A,B,C)
  ans+=1
  if 10**9<ans:
    ans=-1
    break
print(ans)
a,b,c = map(int,input().split())
acnt = 0
bcnt = 0
ccnt = 0
cnt = 0

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

while acnt%2 != 1 and bcnt%2 != 1 and ccnt%2 != 1:
    cnt += 1
    acnt = (b+c)//2
    bcnt = (a+c)//2
    ccnt = (a+b)//2
    a = acnt
    b = bcnt 
    c = ccnt

print(cnt)
A,B,C = map(int, input().split())
a = [A]
b = [B]
c = [C]
count = 0
for i in range(10 ** 9):
 
    if a[i] == b[i] == c[i]:
        count = -1
        break
    elif a[i] % 2 == 1 or b[i] % 2 == 0 or c[i] % 2 == 1:
        break
    else:
        a.append(b[i] / 2 + c[i] / 2)
        b.append(a[i] / 2 + c[i] / 2)
        c.append(a[i] / 2 + b[i] / 2)
        count += 1

print(count)
a,b,c=map(int,input().split())
e=a-b|b-c
print(len(bin(e&-e))-3or~b%-2^e)
a,b,c = list(map(int, input().split()))

if a==b==c:
    print(-1)
    exit()

ans=0    
while not (a&1 or b&1 or c&1):
    a,b,c = (b+c)//2, (a+c)//2, (a+b)//2
    ans+=1

print(ans)
from sys import stdin

a,b,c = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
num = 0

if a==b==c:
    print(-1)
    exit()

while True:
    if a%2 == 1 or b%2 == 1 or c%2 == 1:
        print(count)
        exit()
    else:
        a,b,c = b//2+c//2,c//2+a//2,a//2+b//2
        count += 1
    num += 1
a,b,c=map(int,input().split())
e=b-a|a-c
print((e!=a%2)*(e&-e).bit_length()-1)
a,b,c = map(int,input().split())
cou = 0
if a==b and b==c and c==a :
  print(-1)
  exit()
while a%2==0 and b%2==0 and c%2==0:
  j=int(a//2)
  k=int(b//2)
  m=int(c//2)
  a += k+m
  b += j+m
  c += j+k
  cou += 1
print(cou)
A,B,C = map(int, input().split())
a = [A]
b = [B]
c = [C]
count = 0
for i in range(10 ** 9):
 
    if a[i] == b[i] == c[i]:
        count = -1
        break
    elif a[i] % 2 == 1 or b[i] % 2 == 1 or c[i] % 2 == 1:
        break
    else:
        a.append(b[i] / 2 + c[i] / 2)
        b.append(a[i] / 2 + c[i] / 2)
        c.append(a[i] / 2 + b[i] / 2)
        count += 1

print(count)
ABC = list(map(int, input().split()))

cnt = 1

if ABC[0] == ABC[1] == ABC[2]:
    print(-1)
    exit()
else:
    while True:
        ABC[0], ABC[1], ABC[2] = (ABC[1]+ABC[2])//2, (ABC[0]+ABC[2])//2, (ABC[0]+ABC[1])//2
        if ABC[0]%2 == ABC[1]%2 == ABC[2]%2 == 0:
            cnt += 1
        else:
            break
 
print(cnt)
A, B, C = map(int, input().strip().split())
ans = 0
while A != B and B != C and (A % 2) + (B % 2) + (C % 2) == 0:
  A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2
  ans += 1
print(ans)
x = list(map(int,input().split()))
point = 0
def count(x,point):
    if x[0]%2 == 1 or x[1]%2 == 1 or x[2]%2 == 1:
        return(point)
    else:
        point += 1
        x = [(x[0]+x[1])/2,(x[0]+x[2])/2, (x[1]+x[2])/2]
        return(count(x,point))

if x[0] == x[1] == x[2]:
    print(-1)
else:
    print(count(x,point))
A,B,C = map(int, input().split())
ans = 0 
while 1:
  if A == B == C:
    print(-1)
    break
  if (A%2,B%2,C%2) == (0,0,0):
    ans += 1
    A,B,C = (B+C)//2,(C+A)//2,(A+B)//2
  else:
    print(ans)
    break
a, b, c = map(int, input().split())

count = 0

while True:
  if a == b == c:
    print(-1)
    exit()
  elif a%2 == b%2 == c%2 == 0:
    a, b, c = (b+c)/2, (a+c)/2, (a+b)/2
    count += 1
  else:
    break

print(count)
A, B, C = map(int, input().split())
if A == B == C:
    print(-1)
else:
    cnt = 0
    while A%2 + B%2 + C%2 == 0:
        x = B//2+C//2
        y = A//2+C//2
        z = A//2+B//2
        A = x
        B = y
        C = z
        cnt += 1
    print(cnt)
A,B,C=map(int,input().split())

a=0

D=set()
D.add((A,B,C))
while True:
    p=(B+C)/2
    q=(A+C)/2
    r=(A+B)/2
    a+=1
    if p%2!=0 or q%2!=0 or r%2!=0:
        break
    if (p,q,r) in D:
        a=-1
        break
    else:
        D.add((p,q,r))
    A=p;B=q;C=r
print(a)
l = list(map(int, input().split()))
cnt=0
while True:
    if l[0]==l[1]==l[2]:
        print(-1)
        exit()
    a=(l[1]/2)+(l[2]/2)
    b=(l[0]/2)+(l[2]/2)
    c=(l[0]/2)+(l[1]/2)
    if a%2==0 and b%2==0 and c%2==0:
        l.clear()
        l.append(a)
        l.append(b)
        l.append(c)
        cnt+=1
    else:
        print(cnt+1)
        exit()
A, B, C = map(int, input().split())
count = 0
ABC = []
while True:
    if A % 2 ==0 and B % 2 == 0 and C % 2 == 0:
        nA = B/2 + C/2
        nB = A/2 + C/2
        nC = A/2 + B/2
        A, B, C = nA, nB, nC
        ABC.append([A, B, C])
        count += 1
        if [A, B, C] in ABC:
            count = -1
            break
    else:
        break
print(count)
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

A, B, C = map(int, readline().split())

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

ans = 0
while True:
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        break
    half_A = A // 2
    half_B = B // 2
    half_C = C // 2

    A = half_B + half_C
    B = half_A + half_C
    C = half_A + half_B
    ans += 1

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

ans=0
if a==b==c:
  if a%2==0:
    print(0)
    exit()
  else:
    print(-1)
    exit()
while a%2==0 and b%2==0 and c%2==0:
  num_a,num_b,num_c=a/2,b/2,c/2
  a=num_b+num_c
  b=num_a+num_c
  c=num_a+num_b
  ans+=1
print(ans)
a,b,c = map(int,input().split())
acnt = 0
bcnt = 0
ccnt = 0
cnt = 0

if a == b == c:
    print(-1)
    exit()

while acnt%2 != 1 and bcnt%2 != 1 and ccnt%2 != 1:
    acnt = b/2 + c/2
    bcnt = a/2 + c/2
    ccnt = a/2 + b/2
    a = acnt
    b = bcnt 
    c = ccnt
    cnt += 1

print(cnt)
A, B, C = map(int, input().split())

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


if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
    print('0')
    exit()

count = 0
m = max(A, B, C) - min(A, B, C)
for i in range(10**9):
    if (m % 2 == 0):
        m = m // 2
        count += 1
    if (str(m)[0] == '2'):
        break
print(count)
a, b, c = map(int, input().split())
ans = 0

if a == b == c:
    print(-1)
else :
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        aa, bb, cc = a, b, c
        a = (bb + cc) / 2
        b = (aa + cc) / 2
        c = (aa + bb) / 2
        ans += 1
    print(ans)
import bisect,collections,copy,itertools,math,numpy,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())
##################################################
A,B,C = LI()
ans = 0
if A==B==C:
    ans = -1
else:
    while 1:
        A,B,C = (B+C)//2,(A+C)//2,(A+B)//2
        ans += 1
        if A%2 or B%2 or C%2:
            break
print(ans)
A,B,C=map(int,input().split())
cnt=0
while True:
    if A==B==C:
        cnt-=1
        break
    elif A%2==B%2==C%2==0:
        hA=A//2
        hB=B//2
        hC=C//2
        A=hB+hC
        B=hA+hC
        C=hA+hB
        cnt+=1
    else:
        break

print(cnt)
def myAnswer(A:int,B:int,C:int) ->int:
   if(A == B and B == C):
      return -1
   counter = 0
   while A%2 == 0 and B%2 == 0 and C%2 == 0:
      A, B, C = ((B//2 + C//2), (A//2 + C//2), (A//2 + B//2))
      counter += 1
   return counter

def modelAnswer():
   tmp=1
def main():
   A,B,C = map(int,input().split())
   print(myAnswer(A,B,C))

if __name__ == '__main__':
   main()
def waru2cnt(n):
    cnt = 0
    while n % 2 == 0 and n != 0:
        n //= 2
        cnt += 1
    return cnt

a = list(map(int, input().split(' ')))
a.sort()
x = 2 * a[2] - a[1] - a[0] 

print([waru2cnt(x),-1][x==0])
a,b,c = map(int,input().split())
count = 0
if a==b and b==c:
    count = -1
else:
    while True:
        if a%2==1 or b%2==1 or c%2==1:
            break
        d = a;e = b
        a = b//2 + c//2
        b = d//2 + c//2
        c = d//2 + e//2
        count += 1
print(count)
A, B, C = map(int, input().split())
x, y = abs(A-B), abs(B-C)
ans = 0
if x == 0 and y == 0:
  print(-1)
  exit()

while x % 2 == 0 and y % 2 == 0:
  x, y = x // 2, y // 2
  ans += 1
print(ans)
A,B,C=map(int, input().split())
if A==B and B==C:
  print('-1')
  exit(0)

cnt=0
ctr=0
while True:
  A=A//2
  B=B//2
  C=C//2
  flgA=A%2==0
  flgB=B%2==0
  flgC=C%2==0
  Aa=B+C
  Bb=A+C
  Cc=A+B
  A=Aa
  B=Bb
  C=Cc

  cnt+=1
  ctr+=1
  if [flgA, flgB, flgC].count(True) !=3:
    break
  if ctr >=100:
    print('-1')
    exit(0)

print(cnt)
a,b,c=map(int,input().split())
f=True
aa=0
bb=0
cc=0
cnt=0
while f:
	aa = b/2+c/2
	bb = a/2+c/2
	cc = a/2+b/2
	cnt+=1
	if aa == a and bb == b and cc == c:
		cnt = -1
		break
	if aa%2!=0 or bb%2!=0 or cc%2!=0:
		f=False
	else:
		a=aa
		b=bb
		c=cc
	
print(cnt)
import sys
a,b,c = map(int,input().split())
if a == b == c:
    print(-1)
    sys.exit()
count = 0
while a%2 == 0 and b%2 == 0 and c%2 == 0:
    x = (b+c)//2
    y = (a+c)//2
    z = (a+b)//2
    a,b,c = x,y,z
    count+=1
    #print(a,b,c)
print(count)
A, B, C = map(int, input().split())

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

count = 0
for i in range(10**9):
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        break
    count += 1
    a = A
    b = B
    c = C
    A = b // 2 + c // 2
    B = a // 2 + c // 2
    C = a // 2 + b // 2

print(count)
def main():
    A, B, C = map(int, input().split())

    ans = 0
    if (2 * A - B - C) == 0 and (2 * B - A - C) == 0 and (2 * C - A - B) == 0:
        print(-1)
    else:
        while True:
            if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
                print(ans)
                exit()

            A, B, C = (B + C)//2, (A + C)//2, (A + B)//2
            ans += 1

if __name__ == "__main__":
    main()
A,B,C = [int(i) for i in input().split()]

if A==B==C:
  print(-1)
else:
  ans = 0
  while 1:
    if A%2==1 or B%2==1 or C%2 ==1:
      print(ans)
      break
    tempA = A//2
    tempB = B//2
    A = tempB + C//2
    B = tempA + C//2
    C = tempA + tempB
    ans+=1
def resolve():
    a, b, c = map(int, input().split())
    if a == b == c:
        print(-1)
        exit()
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        print(0)
        exit()
    ans = 0
    while (a % 2 == 0 and b % 2 == 0 and c % 2 == 0): 
        a, b, c = (b+c)//2, (a+c)//2, (a+b)//2
        ans += 1
    print(ans)
resolve()