peterverebics/CodeNet_Python_118 huggingface dataset:
a,b,c = map(int, input().split())
val = 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,b,c = int((b+c)/2), int((a+c)/2), int((a+b)/2)
    val += 1
  print(val)
a, b, c = map(int, input().split())
if a == b == c:
    if a % 2:
        print(0)
    else:
        print(-1)
else:
    ans = 0
    while a % 2 == b % 2 == c % 2 == 0:
        ans += 1
        a, b, c = b // 2 + c // 2, a // 2 + c // 2, a // 2 + b // 2
    print(ans)
a,b,c = map(int,input().split())
cnt = 0

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

while a%2 == 0 and b%2 == 0 and c%2 == 0:
    cnt+=1
    i=a
    j=b
    a=(b+c)//2
    b=(i+c)//2
    c=(i+j)//2

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

while a%2==0 and b%2==0 and c%2==0:
    if a == b == c :
        cnt = -1
        break
    ta,tb,tc = a,b,c
    a = tb/2 + tc/2
    b = ta/2 + tc/2
    c = ta/2 + tb/2
    cnt += 1

print(cnt)
A, B, C = map(int, input().split())
for i in range(100):
    if A%2 == 0 and B%2 == 0 and C%2 == 0:
        A, B, C = B+C>>1, C+A>>1, A+B>>1
    else:
        print(i)
        break
else:
    print(-1)
A, B, C = map(int, input().split())
if A == B == C and A % 2 == 0:
  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

while(cnt<=10**6):
    if A%2==0 and B%2==0 and C%2==0:
        mm1 = (B//2+C//2)
        mm2 = (A//2+C//2)
        mm3 = (A//2+B//2)
        A,B,C = mm1,mm2,mm3
        cnt += 1
    else:
        break

if cnt==10**6+1:
    print(-1)
else:
    print(cnt)
a,b,c = map(int,input().split())
ans = 0
for i in range(10 ** 5):
         if (a % 2 == 1) or (b % 2 == 1) or (c % 2 == 1):
                  print(ans)
                  exit()
         tmpa = a
         tmpb = b
         tmpc = c
         a = (tmpb // 2) + (tmpc // 2)
         b = (tmpc // 2) + (tmpa // 2)
         c = (tmpa // 2) + (tmpb // 2)
         ans += 1
print(-1)
A, B, C = map(int,input().split())

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

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 = list(map(int, input().split()))
l = [a, b, c]


time_of_exchange = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
	
	if a == b == c:
		time_of_exchange = -1
		break
	
	a = (l[1] + l[2]) / 2
	b = (l[0] + l[2]) / 2
	c = (l[0] + l[1]) / 2
	l = [a, b, c]
	
	time_of_exchange += 1
	
print(time_of_exchange)
import sys
a,b,c=map(int,input().split())
ans=0
if a%2==1 or b%2==1 or c%2==1:
    print(0)
    sys.exit()
if a%2==0 and a==b==c:
    print(-1)
    sys.exit()
while a%2==0 and b%2==0 and c%2==0:
    ta=a/2
    tb=b/2
    tc=c/2
    a=tb+tc
    b=ta+tc
    c=ta+tb
    ans+=1
print(ans)
A, B, C = map(int, input().split())
T = [A, B, C]
T.sort()
count = 0

def trade(T, count):
    Ts = [0]*3
    if T[0] == T[1] == T[2] and T[0]%2==0:
        return -1
    elif T[0]%2 != 0 or T[1]%2 != 0 or T[2]%2 != 0:
        return count
    else:
        count += 1
        Ts[0] = (T[1]+T[2])/2
        Ts[1] = (T[0]+T[2])/2
        Ts[2] = (T[0]+T[1])/2
        return trade(Ts, count)

print(trade(T, count))
# coding: utf-8
A, B, C = map(int, input().split())
count = 0

while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    if A == B == C:
        print(-1)
        exit()
    count += 1
    A1 = A
    B1 = B
    C1 = C
    A = B1//2 + C1//2
    B = A1//2 + C1//2
    C = A1//2 + B1//2

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

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

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

count = 0

while True:
    count += 1
    a,b,c = b//2+c//2,a//2+c//2,a//2+b//2
    if a%2 == 1 or b%2 == 1 or c%2 == 1:
        break

print(count)
A, B, C = map(int, input().split())
cnt = 0
while True:
  if A%2!=0 or B%2!=0 or C%2!=0:
    print(cnt)
    break
  elif A == B and B == C and A == C:
    print(-1)
    break
  else:
    temp_A = A
    temp_B = B
    A = B/2 + C/2
    B = temp_A/2 + C/2
    C = temp_A/2 + temp_B/2
    cnt += 1
a,b,c=map(int,input().split())

if a%2==1 or b%2==1 or c%2==1:
  print(0)
  exit()
if a==b==c:
  print(-1)
  exit()
ans=0
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 
print(ans)
a, b, c = map(int, input().split())

ba = a
bb = b
bc = c
ans = 0
while True:
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        break

    if a==b==c:
        ans=-1
        break
    ta = a//2
    tb = b//2
    tc = c//2
    a = tb+tc
    b = ta+tc
    c = ta+tb
    ans += 1

    # if a == ba and b == bb and c == bc:
    #     ans = -1
    #     break

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

if a == b == c and a % 2 == 0:
    print(-1)
else:
    count = 0
    while True:
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            break
        count += 1
        temp_a = b // 2 + c // 2
        temp_b = a // 2 + c // 2
        temp_c = a // 2 + b // 2
        a, b, c = temp_a, temp_b, temp_c
    print(count)
a,b,c=map(int,input().split())
d=0
if a==b==c and a%2==0:
    print(-1)
else:
    while a%2==0 and b%2==0 and c%2==0:
        a,b,c=(b+c)//2,(a+c)//2,(a+b)//2
        d+=1
    print(d)
A,B,C = [int(i) for i in input().split()]

if A==B==C and A%2==0:
  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
l = list(map(int,input().split()))
count = 0
while True:
    if l[0] == l[1] == l[2]:
        if l[1]%2 == 0:
            print(-1)
            exit()
    for i in range(3):
        if l[i]%2 == 1:
            print(count)
            exit()
    count += 1
    l[0],l[1],l[2] = (l[1]+l[2])//2,(l[0]+l[2])//2,(l[1]+l[0])//2
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
        count += 1
        if [A, B, C] in ABC:
            count = -1
            break
        ABC.append([A, B, C])
    else:
        break
print(count)
a,b,c = map(int,input().split())
r = 0
if a == b == c:
  if a%2 == 1:
    print(r)
    exit()
  else:
    print(-1)
    exit()

while True:
  if a%2 == 1 or b%2 == 1 or c%2 == 1:
    break
  r += 1
  aa = (b+c)//2
  bb = (a+c)//2
  cc = (a+b)//2
  a,b,c = aa,bb,cc

print(r)
A,B,C=map(int,input().split())
if A==B==C and A%2==B%2==C%2==0:
  print('-1')
elif A%2!=0 or B%2!=0 or C%2!=0:
  print('0')
else:
  ans=0
  while A%2==0 and B%2==0 and C%2==0:
    a=A
    b=B
    c=C
    A=int((b+c)/2)
    B=int((c+a)/2)
    C=int((a+b)/2)
    ans+=1
  print(ans)
a, b, c = map(int, input().split())

if a == b == c:
    if a % 2:
        print(0)
    else:
        print(-1)
else:
    cnt = 0
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        na = (b+c)//2
        nb = (a+c)//2
        nc = (a+b)//2
        cnt += 1
        a = na; b = nb; c = nc
    print(cnt)
A,B,C=map(int,input().split())

Q=0
if A==B and B==C and C==A:
    if A%2==1 or B%2==1 or C%2==1:
        print(0)
    elif  A%2==0 or B%2==0 or C%2==0:
        print(-1)
else:
    for i in range(100):
        if A%2==1 or B%2==1 or C%2==1:
            print(Q)
            break
        else:
            A,B,C=(B+C)//2,(C+A)//2,(A+B)//2
            Q+=1
A,B,C = list(map(int,input().split()))
if A==B==C:
    if A%2 == 0:
        print(-1)
    else:
        print(0)
else:
    count = 0
    while not A%2 and not B%2 and not C%2:
        if (B+C)%2 or (A+C)%2 or (A+B)%2:
            break
        A,B,C = (B+C)//2,(A+C)//2,(A+B)//2
        count += 1
    print(count)
import sys
from collections import defaultdict

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

cnt = 0
memo = defaultdict(int)

while (A % 2 != 1) & (C % 2 != 1) & (C % 2 != 1):
    if memo[(A, B, C)]==1:
        print(-1)
        sys.exit()
    tmp_a = A // 2
    tmp_b = B // 2
    tmp_c = C // 2
    memo[(A, B, C)] = 1
    A = tmp_b + tmp_c
    B = tmp_c + tmp_a
    C = tmp_a + tmp_b
    cnt += 1

print(cnt)
def exchange(a, b, c):
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        return 0

    if a == b == c:
        return -1

    return exchange((b + c) / 2, (c + a) / 2, (a + b) / 2) + 1


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

    ans = exchange(a, b, c)

    print(ans)


if __name__ == "__main__":
    main()
A,B,C=map(int,input().split())
if A==B and B==C and A%2==0:
    print(-1)
elif A%2==1 or B%2==1 or C%2==1:
    print(0)
else:
    ans=0
    flag=0
    d=0
    while flag==0:
        if (A>>d &1)==(B>>d &1) and (C>>d &1)==(B>>d &1):
            d+=1
        else:
            ans=d
            break
    print(ans)
a, b, c = map(int,input().split())
ans = 0

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

while a%2 == 0 and b%2 == 0 and c%2 == 0:
    ans += 1

    x = b//2 + c//2
    y = a//2 + c//2
    z = a//2 + b//2
    
    a = x
    b = y
    c = z

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

    cnt = 0
    while True:
        if A % 2 or B % 2 or C % 2:
            return cnt
        ta = B // 2 + C // 2
        tb = A // 2 + C // 2
        tc = A // 2 + B // 2
        if ta == A and tb == B and tc == C:
            return -1
        A, B, C = ta, tb, tc
        cnt += 1


print(solve())
*l, = map(int, input().split())

ans = 0
while True:
    if l[0]%2 or l[1]%2 or l[2]%2:
        break
    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

print(ans)
A, B, C = map(int, input().split())
X = (A|B|C)^(A&B&C)
ans = (X&-X).bit_length()-1
print(0 if (A|B|C)&1 else ans)
# n , m , l = map(int , input().split())

# list_n = list(map(int , inpuut().split()))<Paste>

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]


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

n = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    if A == B and B == C:
        n = -1
        break

    An = (B + C) // 2
    Bn = (A + C) // 2
    Cn = (A + B) // 2

    A = An
    B = Bn
    C = Cn
    n += 1

print(n)
li = list(map(int,input().split()))
nx = [0,0,0]
ans = 0
if all(x&1 == 0 for x in li) and li[0] == li[1] == li[2]:
    print(-1)
else:
    while 1:
        if(li[0]%2!=0 or li[1]%2!=0 or li[2]%2!=0):
            break
        nx[0] = (li[1] + li[2])/2
        nx[1] = (li[0] + li[2])/2
        nx[2] = (li[0] + li[1])/2
        li = nx.copy()
        ans += 1
    print(ans)
import sys
A,B,C=map(int,input().split())
cnt=0
A_old=B_old=C_old=0
for i in range(100000000):
    if A%2==1 or B%2==1 or C%2==1:
        print(cnt)
        sys.exit()
    elif  A==A_old and B==B_old and C==C_old:
        print(-1)
        sys.exit()

    A_old=A
    B_old=B
    C_old=C
    A=C_old/2+B_old/2
    B=A_old/2+C_old/2
    C=A_old/2+B_old/2
    cnt+=1
a, b, c = map(int, input().split())

count = 0

for _ in range(1000000):
    
    _a, _am = divmod(a, 2)
    _b, _bm = divmod(b, 2)
    _c, _cm = divmod(c, 2)

    if _am or _bm or _cm:
        print(count)
        break
    elif a == b == c:
        print(-1)
        break
    else:
        a = _b + _c
        b = _a + _c
        c = _a + _b
        count += 1
else:
    print(-1)
A,B,C =map(int,input().split())
con = 0
if A % 2 == 1 or B % 2 == 1 or C % 1 == 1:
  print(0)
  exit()
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())
e=a-b|b-c
print((e!=b%2)*len(f'{(e&-e):b}')-1)
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    A, B, C = [int(x) for x in input().split()]

    cnt = 0
    while True:
        if cnt > 10 ** 5:
            print(-1)
            return

        if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
            print(cnt)
            return

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

if __name__ == '__main__':
    main()
a,b,c = map(int, input().split())
if  a==b==c and a%2 ==0:
    print(-1)
else:
    res = 0
    while True:
        if a%2 != 0 or b%2 != 0 or c%2 != 0:
            break
        a, b, c = (b+c)//2, (a+c)//2, (a+b)//2
        res += 1
    print(res)
a,b,c = map(int,input().split())

cnt = 0

if a==b==c and a%2==0:
  print("-1")
  exit()
  
for i in range(10**6):
  if a%2==0 and b%2==0 and c%2==0:
    tmpA = b/2 + c/2
    tmpB = a/2 + c/2
    tmpC = a/2 + b/2
    a = tmpA
    b = tmpB
    c = tmpC
    cnt +=1
  else:
    print(cnt)
    break
A, B, C = map(int, input().split())
if A == B and B == C and A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    print(-1)
else:
    ans = 0
    while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
        a = A // 2
        b = B // 2
        c = C // 2
        A = b + c
        B = c + a
        C = a + b
        ans += 1
        if ans > 10**5:
            print(-1)
            exit()
    print(ans)
a, b, c = map(int, input().split())

count = 0

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

print(count)
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] and x[0]%2==0:
    print(-1)
else:
    print(count(x,point))
def f(a,b,c):
  if a%2+b%2+c%2>0:
    return 0
  if a==b==c:
    return -1
  return f((b+c)//2,(c+a)//2,(a+b)//2)+1

a,b,c=map(int,input().split())
print(f(a,b,c))
a, b, c = list(map(int, input().split()))
if a == b == c and a % 2 == 0:
    print(-1)
    exit()
count = 0
while True:
    if sum([a % 2, b % 2, c % 2]) > 0:
        print(count)
        exit()
    else:
        a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2
        count += 1
a,b,c=map(int,input().split())
e=(a-b)|(b-c)
print(bool(e|b%2)*(e^~-e).bit_length()-1)
a,b,c = map(int,input().split())
if a == b == c and a%2 == 0:
    print(-1)
    exit()
for i in range(10**8):
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        break
    a_o,b_o,c_o = a,b,c
    a = b_o//2 + c_o//2
    b = a_o//2 + c_o//2
    c = a_o//2 + b_o//2
print(i)
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    a,b,c=map(int,input().split())
    cunt=0
    if a==b and b==c and a%2==0:
        print(-1)
        sys.exit()
    while True:
        if a%2 or b%2 or c%2:
            print(cunt)
            break
        cunt+=1
        a1,b1,c1=a,b,c
        a=(b1+c1)//2
        b=(a1+c1)//2
        c=(a1+b1)//2

if __name__=='__main__':
    main()
X=[int(x) for x in input().split()]
count=0
if ((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0 and X[0]==X[1] and X[1]==X[2]):
  count=-1
else:
  while((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0):
    Y=[0,0,0]
    Y[0]=(X[1]+X[2])/2
    Y[1]=(X[0]+X[2])/2
    Y[2]=(X[1]+X[0])/2
    X=Y
    count =count+1
print(count)
a,b,c=map(int,input().split())
ans=0
while a%2==0 and b%2==0 and c%2==0:
  d,e,f=0,0,0
  d=(b+c)//2
  e=(a+c)//2
  f=(a+b)//2
  a,b,c=d,e,f
  ans+=1
  if ans==100000:
    ans=(-1)
    break
print(ans)
a,b,c=map(int,input().split())
if a==b==c and a%2==0 and b%2==0 and c%2==0:
    print(-1)
else:
    p=0
    while a%2==0 and b%2==0 and c%2==0:
        aa=(b+c)//2
        bb=(c+a)//2
        cc=(b+c)//2
        a,b,c=aa,bb,cc
        p+=1
    print(p)
a, b, c = map(int, input().split())

count = 0
while True:
    if a == b == c and a%2 == 0:
        count = -1
        break

    if a%2 == 0 and b%2 == 0 and c%2 == 0:
        count += 1
        a, b, c = (b + c)//2, (a + c)//2, (a + b)//2
    else:
        break

print(count)
#13
a,b,c = map(int,input().split())
cnt = 0
if a%2 == 1 or b%2 == 1 or c%2 == 1:
    print('0')

elif a==b==c and a%2==0:
            print('-1')
    
elif not a==b==c:
    while a%2 == b%2 == c%2 == 0:
        a,b,c = b//2+c//2,c//2+a//2,a//2+b//2
        cnt+=1
    print(cnt)
A = list(map(int, input().split()))
ans = 0
if A[0] == A[1] == A[2]:
  if A[0] % 2 == 0: ans = -1
  else: ans = 0
else:
  ans = 0
  ok = True
  a = b = c = 0
  while ok:
    if A[0] % 2 != 0 or A[1] % 2 != 0 or A[2] % 2 != 0:
      ok = False
    a = (A[1] + A[2]) / 2
    b = (A[0] + A[2]) / 2
    c = (A[0] + A[1]) / 2
    if ok: 
      A = [a, b, c]
      ans += 1
print(ans)
#!/usr/bin/env python3

A,B,C = [int(x) for x in input().split(" ")]

ans = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    ans += 1
    A_new = B / 2 + C / 2
    B_new = A / 2 + C / 2
    C_new = A / 2 + B / 2
    if A == A_new and B == B_new and C == C_new:
        ans = -1
        break
    A = A_new
    B = B_new
    C = C_new

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

if a%2==0 and b%2==0 and c%2==0 and a==b==c:
    print(-1)
else:
    res = 0
    while True:
        if a%2==1 or b%2==1 or c%2==1:
            break
        else:
            a, b, c = b//2+c//2, a//2+c//2, a//2+b//2
            res += 1
    print(res)
import sys
a,b,c=map(int,input().split())
if a%2==1 or b%2==1 or c%2==1:
    print(0)
    sys.exit(0)
elif a==b and b==c:
    print(-1)
    sys.exit(0)
ans=0
for i in range(1,10000):
    x=a//2
    y=b//2
    z=c//2
    a=y+z
    b=x+z
    c=x+y
    if a%2==1 or b%2==1 or c%2==1:
        ans=i
        break
print(ans)
A,B,C = map(int,input().split())
cnt = 0
if A == B and B == C and A % 2 == 0:
	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 = list(map(int, input().split()))

if not (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
    print(0)
elif A == B == C:
    print(-1)
else:
    c = 0
    while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
        c += 1
        A2 = (B + C) // 2
        B2 = (A + C) // 2
        C2 = (A + B) // 2

        A = A2
        B = B2
        C = C2
        # print(A, B, C)
    print(c)
from sys import exit
a,b,c = map(int,input().split())
cnt = 0
while ~a&1 and ~b&1 and ~c&1:
    newa = b//2+c//2
    newb = a//2+c//2
    newc = a//2+b//2
    a,b,c = newa,newb,newc
    cnt += 1
    if cnt >= 10**5:
        exit(print(-1))
print(cnt)
a, b, c = map(int, input().split())

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

OK = True
count = 0

while OK:
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        OK = False
        break
    diva = a//2
    divb = b//2
    divc = c//2
    a = divb + divc
    b = divc + diva
    c = diva + divb
    count += 1

print(count)
a,b,c = map(int,input().split())
ans = 0
while a%2==b%2==c%2==0:
    a,b,c = (b+c)//2, (a+c)//2, (a+b)//2
    ans += 1
    if ans > 100:
        ans = -1
        break
print(ans)
x,y,z=list(map(int, input().split()))
a=x
b=y
c=z
cnt=0
for i in range(100):
	if a%2==0 and b%2==0 and 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=cnt+1
if cnt>30:
	cnt=-1
print(cnt)
l = list(map(int,input().split()))
ans = 0
if l[0] == l[1] == l[2] and l[0] % 2 == 0:
  print(-1)
  exit()
while all(i % 2 == 0 for i in l):
  l[0], l[1], l[2] = l[1]//2 + l[2]//2, l[0]//2 + l[2]//2, l[0]//2 + l[1]//2
  ans += 1
print(ans)
a,b,c=map(int,input().split())
ta,ao,su=a,b,c
cnt=0
f=True
while f:
	if ta%2!=0 or ao%2!=0 or su%2!=0:
		f=False
	elif ta==ao==su:
		f=False
		cnt=-1
	else:
		ta=(b+c)/2
		ao=(a+c)/2
		su=(a+b)/2
		cnt+=1
		a=ta
		b=ao
		c=su
print(cnt)
a, b, c = map(int, input().split())

count = 0
while all([a % 2 == 0, b % 2 == 0, c % 2 == 0]):
    if a == b and b == c:
        print(-1)
        exit()
    a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2
    count += 1

print(count)
a,b,c = map(int, input().split())
if a == b == c:
    if a % 2 == 1:
        print(0)
    else:
        print(-1)
else:
    ans = 0
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        next_a = b//2 + c//2
        next_b = a//2 + c//2
        next_c = a//2 + b//2
        a = next_a
        b = next_b
        c = next_c
        ans += 1
    print(ans)
a,b,c = map(int,input().split())
ans = 0
if a == b == c and a%2 == 0:
    print(-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)
import sys

input = sys.stdin.readline

def main():
    ans = 0
    a, b, c = map(int, input().split())
    while a%2 == b%2 == c%2 == 0:
        ans += 1
        a, b, c = (b//2 + c//2), (a//2 + c//2), (a//2 + b//2)
        if a == b == c:
            ans = -1
            break

    print(ans)

if __name__ == '__main__':
    main()
a,b,c = map(int,input().split())
s = [a,b,c]
ans = 0

while a%2 + b%2 + c%2 == 0:
    na = (b + c) // 2
    nb = (a + c) // 2
    nc = (a + b) // 2
    
    if [na,nb,nc] == s:
        ans = -1
        break
        
    else:
        a = na
        b = nb
        c = nc
        ans += 1
        
print(ans)
A,B,C = [int(i) for i in input().split()]
if A == B == C and not A&1:
    print(-1)
    exit()
c = 0
while not (A&1 or B&1 or C&1):
    A,B,C = (B+C)//2, (A+C)//2, (A+B)//2
    c += 1
print(c)
a,b,c = map(int,input().split())
cnt = 0
def f(a,b,c):
	return b//2 + c//2, a//2 + c//2, a//2 + b//2

while (a%2==0 and b%2==0 and c%2==0):
	if a==b and b==c and c==a:
		print('-1')
		exit()
	else:
		cnt += 1
		a,b,c = f(a,b,c)
print(cnt)
a,b,c=map(int,input().split())
if a%2==1 or b%2==1 or c%2==1:
  print(0)
elif a==b==c:
  print(-1)
else:
  ans=0
  while a%2==0 and b%2==0 and c%2==0:
    ans+=1
    a1=(b+c)//2
    b1=(c+a)//2
    c1=(a+b)//2
    a=a1
    b=b1
    c=c1
  print(ans)
a,b,c=map(int,input().split())

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

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())
# 奇数があったら0回
if any([q%2==1 for q in (a,b,c)]):
  print(0)
  exit()
# 全部偶数で等しいと終わらない
if a==b==c:
  print(-1)
  exit()
# ではなければシミュレーションでOK
cnt=0
while all([q%2==0 for q in (a,b,c)]):
  cnt+=1
  s=a+b+c
  a=s-a
  a//=2
  b=s-b
  b//=2
  c=s-c
  c//=2
print(cnt)
a,b,c=map(int,input().split())
count=0

if a==b==c and(a%2==0 and b%2==0 and c%2==0):
    print(-1)
else:      
    while True:
        a1=a//2
        b1=b//2
        c1=c//2
        if (a%2==0 and b%2==0 and c%2==0):
            count+=1
            a=b1+c1
            b=a1+c1
            c=a1+b1
        else:
            print(count)
            break
# A - Cookie Exchanges

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

if A==B and B==C and C%2==0:
    ans = -1
else:
    while A%2==B%2==C%2==0:
        ans += 1
        A, B, C = (B+C)/2, (C+A)/2, (A+B)/2

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

cnt = 0
if A%2==1 or B%2==1 or C%2==1:
    print(cnt)
elif A==B==C:
    print('-1')
else:
    flag = True
    while flag:
        A, B, C = (B+C)//2, (A+C)//2, (A+B)//2
        cnt += 1
        if A%2==0 and B%2==0 and C%2==0:    
            continue
        else:
            flag = False

    print(cnt)
A,B,C=map(int,input().split())
cnt=0
if(A==B==C):
    if A%2!=0:
        print(0)
    else:
        print(-1)
    exit()
while(A%2==B%2==C%2==0):
    a,b,c=A,B,C
    A=b//2+c//2;B=a//2+c//2;C=a//2+b//2
    cnt+=1
print(cnt)
def solve():
    A, B, C = map(int, input().split())
    if A == B == C and A % 2 == 0:
        return -1

    cnt = 0
    while True:
        if A % 2 or B % 2 or C % 2:
            return cnt
        A, B, C = (B + C) // 2, (C + A) // 2, (A + B) // 2
        cnt += 1


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

if A == B == C: 
  print(-1 if A%2==0 else 0)
else:
  c = 0
  while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    ba = A
    bb = B
    bc = C
    A = (bb + bc)//2
    B = (ba + bc)//2
    C = (ba + bb)//2
    c+=1
  print(c)