peterverebics/CodeNet_Python_118 huggingface dataset:
a,b,c = map(int,input().split())
if a==b==c:
    print(-1)
else:
    res = 0
    while True:
        if (a%2!=0 or b%2!=0 or c%2!=0) or (a==0 or b==0 or c==0):
            break
        else:
            res += 1
            nx_a = b//2 + c//2
            nx_b = a//2 + c//2
            nx_c = a//2 + b//2
            a,b,c = nx_a, nx_b, nx_c
    print(res)
A,B,C = list(map(int,input().split()))
if A==B==C:
    print(-1)
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)
a, b, c = map(int, input().split())
if a == b == c:
    print(-1)
    exit()
for i in range(0, 10**6):
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(i)
        exit()
    a, b, c = (b+c) / 2, (c+a)/2, (a+b)/2
import numpy as np
import sys

input = sys.stdin.readline

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

ans = 0

if A == B and  B == C:
    print(-1)
else:
    while 1:
        next_a =int( C/2 + B/2)
        next_b =int( A/2 + C/2)
        next_c =int( A/2 + B/2)
        A = next_a
        B = next_b
        C = next_c
        ans += 1
        if A%2 != 0 or B %2 != 0 or C%2 != 0:
            print(ans)
            exit()
a, b, c = map(int, input().split())
if a == b == c:
    print(-1)
else:
    cnt = 0
    while True:
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            break
        _a = (b+c)//2
        _b = (c+a)//2
        _c = (a+b)//2
        a = _a
        b = _b
        c = _c
        cnt += 1
    print(cnt)
A, B, C = [int(i) for i in input().split()]
t, a, s = [A, B, C]
count = 0

if A == B == C:
    print(-1)
else:
    while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
        t = B / 2 + C / 2
        a = A / 2 + C / 2
        s = A / 2 + B / 2
        A = t
        B = a
        C = s
        count += 1

    print(count)
import math
import sys

a, b, c = map(int, input().split())
cnt = 0
if (a == b == c):
    print(-1)
    sys.exit()


while(True):
    half_a, half_b, half_c = a / 2, b / 2, c / 2
    ea = a % 2 == 0
    eb = b % 2 == 0
    ec = c % 2 == 0
    if (ea and eb and ec or (not ea) and (not eb) and (not ec)):
        cnt += 1
        a = half_b + half_c
        b = half_a + half_c
        c = half_a + half_b
    else:
        break

print(cnt)
*a, = map(int, input().split())
a = [bin(abs(a[i+1]-a[i]))[::-1].find('1') for i in range(2)]
print(a[1] if a[0]*a[1]<0 else min(a))
x = input().split()
t = int(x[0]) / 2
a = int(x[1]) / 2
s = int(x[2]) / 2
t_after = a + s
a_after = t + s
s_after = t + a
t_amari = t_after % 2
a_amari = a_after % 2
s_amari = s_after % 2
count = 0
while True:
  count =+ 1
  if t_amari != 0 or a_amari != 0 or s_amari != 0:
    break
  elif t == a and a == s:
    count = -1
    break
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),(a+c),(a+b)
        d+=1
print(d)
a,b,c = map(int, input().split())
print(min(bin(abs(a-b))[::-1].rfind('1'),bin(abs(a-b))[::-1].rfind('1')))
import sys
input = sys.stdin.readline

a, b, c = map(int, input().split())
n_a, n_b, n_c = 0, 0, 0
ans = 0

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

for i in range(10 ** 5):
    n_a = b // 2 + c // 2
    n_b = a // 2 + c // 2
    n_c = a // 2 + b // 2

    if n_a % 2 == 0 and n_b % 2 == 0 and n_c % 2 == 0:
        ans += 1
    else:
        ans += 1
        break

    a = n_a
    b = n_b
    c = n_c

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

cnt = 0

while True:

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

    lis = []
    lis.append((b+c)/2)
    lis.append((a+c)/2)
    lis.append((a+b)/2)
    a, b, c = lis

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

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

ans = 0
while A%2==0 and B%2==0 and C%2==0:
    tmpA = A//2
    tmpB = B//2
    tmpC = C//2
    A = tmpB+tmpC
    B = tmpC+tmpA
    C = tmpA+tmpB
    ans += 1

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

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

cnt = 1
while cnt:
    a, b, c = (b+c)//2, (a+c)//2, (a+b)//2
    
    if a % 2 != 0 or \
       b % 2 != 0 or \
       c % 2 != 0: break
    cnt += 1

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

if A == B and B == C:
    print("-1")
else:
    ans = 0
    while True:
        if A%2==1 or B%2==1 or C%2==1:
            break
        a = B/2 + C/2
        b = A/2 + C/2
        c = A/2 + B/2
        A, B, C = a, b, c
        ans += 1
    print(ans)
import sys
a,b,c = map(int,input().split())

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

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

if a == b == c:
    if a%2 == 0:
        print(-1) #無限
    else:
        print(ans) #1回もできない
    exit()

while True:
    ans += 1
    x = b//2 + c//2
    y = a//2 + c//2
    z = a//2 + b//2
    if x%2 == 1 or y%2 == 1 or z%2 == 1:
        break
    else:
        a = x
        b = y
        c = z

print(ans)
import sys

input = sys.stdin.readline


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

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

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

    print(ans)


if __name__ == "__main__":
    main()
a,b,c = map(int,input().split())
if a == b and b == c and c == a:
    print(-1)
elif a %2 == 1 or b %2 == 1 or c %2 == 1:
    print(0)
else:
    cnt = 0
    while(True):
        cnt += 1
        ta = b//2 + c //2
        tb = a//2 + c //2
        tc = a//2 + b //2
        if ta %2 == 1 or tb %2 == 1 or tc %2 == 1:
            break
        a,b,c = ta,tb,tc
    print(cnt)
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:
    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())
con = 0
if A % 2 == 1 or B % 2 == 1 or C % 1 == 0:
  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())
count=0
if A==B and A==C:
  print("-1")
  exit()
elif A%2==1 or B%2==1 or C%2==1:
  print("-1")
  exit()
while True:
  a,b,c=A/2,B/2,C/2
  A,B,C=b+c,a+c,a+b
  count+=1
  if A%2==1 or B%2==1 or C%2==1:
    break
print(count)
a,b,c = map(int, input().split())
count = 0
if not a==b==c and a%2==0 and b%2==0 and c%2==0:
    while a%2==0 and b%2==0 and c%2==0:
        temp_a = a
        temp_b = b
        temp_c = c
        a += temp_b/2 + temp_c/2
        b += temp_a/2 + temp_c/2
        c += temp_a/2 + temp_b/2
        count+=1
    print(count)
else:
    print("-1")
A, B, C = map(int,input().split())
ans = 0
while True:
  if A == B and B == C:
    ans = -1
    break
  elif A & 1 or B & 1 or C & 1: break  
  else: 
    ans += 1
    A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2
print(ans)
A,B,C = map(int,input().split())
ans = 0
if A == B == C:
  ans = -1
else:
  while A%2 == 0 and B%2 == 0 and C%2 == 0:
    A,B,C = B/2+C/2,A/2+C/2,B/2+C/2
    ans += 1
print(ans)
a,b,c=map(int,input().split());e=a-b|c-b;print((e&-e).bit_length()-1)
def main():
  a,b,c = map(int,input().split())
  s = [a,b,c]
  if a == b and b == c:
    return -1

  cnt = 0
  while (a % 2 == 0) and (b % 2 == 0) and (c % 2 == 0):
    
    a1,b1,c1 = a,b,c
    a = (b1+c1)//2
    b = (a1+c1)//2
    c = (a1+b1)//2
    
    if [a,b,c] == s:
      return -1
    
    cnt += 1
    #print(a,b,c)
    
  return cnt    
    

ans = main()
print(ans)
def mapint_inp():
    return map(int, input().split())

A, B, C = mapint_inp()

ans = 0
while(1):
    if A == B and B == C:
        ans = -1
        break
    if A%2==1 or B%2==1 or C%2==1:
        break
    halvedA = A//2
    halvedB = B//2
    halvedC = C//2
    A = halvedB+halvedC
    B = halvedA+halvedC
    C = halvedA+halvedB
    ans+=1

print(ans)
def resolve():
    A, B, C = list(map(int, input().split()))
    if (A == B and B == C and C == A):
        if (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
            print(-1)
        else:
            print(0)
        return

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

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

if A==B==C:
    print('-1')
elif A%2==1 or B%2==1 or C%2==1:
    print(0)
else:
    cnt = 0

    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 = list(map(int, input().split()))
count=0
while True:
    if  A==B and B==C and C==A:
        print(-1)
        break 
    elif A%2==0 and B%2==0 and C%2 == 0:
        A2 = 0.5*A
        B2 = 0.5*B
        C2 = 0.5*C
        A = B2+C2
        B = C2+A2
        C = A2+B2
        count=count+1
    elif A%2 ==1or B%2 ==1 or C%2 ==1:
        print(count)
        break
A,B,C = map(int,input().split())
cou = 0
if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):
  print("0")
while(cou < 10**6):
  cou += 1
  a = A
  b = B
  c = C
  A = b/2 + c/2
  B = a/2 + c/2
  C = a/2 + b/2
  if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):
    print(str(cou))
    exit()
  else:
    pass
print("-1")
A,B,C=map(int,input().split())
count=0
#if A==B and A==C:
print("-1")
exit()
while True:
  a,b,c=A/2,B/2,C/2
  A,B,C=b+c,a+c,a+b
  count+=1
  if A%2==1 or B%2==1 or C%2==1:
    break
print(count)
a,b,c=map(int,input().split())
e=(a-b)|(b-c)
print(bool(e|(a|b|c)%2)*len(f'{e^~-e:b}')-1)
import numpy as np
import sys

input = sys.stdin.readline

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

ans = 0

if A == B and  B == C:
    print(-1)
else:
    while A%2 == 0 and B%2 == 0 and C%2 == 0:
        next_a =int( C/2 + B/2)
        next_b =int( A/2 + C/2)
        next_c =int( A/2 + B/2)
        A = next_a
        B = next_b
        C = next_c
        ans += 1

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

if (a == b ) and (b == c):
  print(-1)
else:
  def exchange(a,b,c):
    return (b+c)/2,(c+a)/2,(a+b)/2
  num = 0
  ans = 0
  while num  == 0:
    a,b,c = exchange(a,b,c)
    ans += 1
    for j in range(3):
      if [a,b,c][j] % 2 ==1:
        num = 1
  print(ans)
A,B,C = map(int,input().split())

if A == B and B == C: 
  print(-1)
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)
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())
e=a-b|c-b
print(len(bin(e&-e))-3or~b%-2)
A, B, C = map(int, input().split())

if A == B == C:
    print('-1')
else:
    ans = 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
        ans += 1
    print(ans)
A, B, C = map(int, input().split())
if A == B and B == C:
    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())
ans = 0
while True:
  if A & 1 or B & 1 or C & 1: break 
  elif A % 4 == B % 4 and B % 4 == C % 4:
    ans = -1
    break  
  else: 
    ans += 1
    A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2
print(ans)
# coding: utf-8
A, B, C = map(int, input().split())
count = 0

if A == B == C:
    print(-1)
    exit()
while True:
    if (A % 2 == 1 or B % 2 == 1 or C % 2 == 1):
        print(count)
        break
    count += 1
    A1 = A
    B1 = B
    C1 = C
    A = B1//2 + C1//2
    B = A1//2 + C1//2
    C = A1//2 + B1//2
a, b, c = map(int, input().split())
if a == b and b == c:
    print(-1)
else:
    count = 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
        count += 1
    print(count)
A, B, C = (int(x) for x in input().split())

count = 0
S = 0
T = 0
U = 0

if(A == B == C):
  print("-1")
  
else:
  while(A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
    count+= 1
    S = 1/2 * A
    T = 1/2 * B
    U = 1/2 * C
    A = T + U 
    B = S + T 
    C = S + U 
  print(count)
A, B, C = map(int, input().split())
cnt = 0

if A == B and B == C:
  print(-1)
else:
  while True:
    if A%2!=0 or B%2!=0 or C%2!=0:
      print(cnt)
      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
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()
a,b,c=map(int,input().split())
if a==b==c:
    print(-1)
else:
    total=0
    while True:
        x=a/2
        y=b/2
        z=c/2
        a=y+z
        b=x+z
        c=x+y
        total+=1
        if a%2!=0 or b%2!=0 or c%2!=0:
            print(total)
            break
a ,b ,c = map(int,input().split())
if a == b == c:
    ans = -1
else:
    ans = 0
    while True:
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            break
        na = a
        nb = b
        nc = c
        a = (nb + nc)//2
        b = (na + nc)//2
        c = (na + nb)//2
        ans += 1
print(ans)
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 == 0 and b[i] % 2 == 0 and c[i] % 2 == 0:
        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
    else:
        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:
        ta=(b//2)+(c//2)
        tb=(a//2)+(c//2)
        tc=(a//2)+(b//2)
        a,b,c=ta,tb,tc
        ans+=1
    print (ans)
a, b, c = map(int,input().split())
ans = 0

if a == b == c:
    if a%2 == 0:
        print(-1) #無限
    else:
        print(ans) #1回もできない

while True:
    ans += 1
    x = b//2 + c//2
    y = a//2 + c//2
    z = a//2 + b//2
    if x%2 == 1 or y%2 == 1 or z%2 == 1:
        break
    else:
        a = x
        b = y
        c = z

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

if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
    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)
import sys
A, B, C = map(int, input().split())
ans = 0

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

while True:
    if A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
        t_A, t_B, t_C = A, B, C
        A = (t_B + t_C) // 2
        B = (t_C + t_A) // 2
        C = (t_A + t_B) // 2
        ans += 1
    else:
        print(ans)
        break
a,b,c=454,414,444

ans=0
if a==b==c:
  print("-1")
else:
  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())


def cnt(N):
    cnt = 0
    while N % 2 == 0:
        cnt += 1
        N //= 2

    return cnt


if A == B == C and A % 2 == 0:
    print(-1)
elif len(set([cnt(A), cnt(B), cnt(C)])) <= 2:
    print(min(cnt(A), cnt(B), cnt(C)))
else:
    print(min(cnt(A), cnt(B), cnt(C)) + 1)
a,b,c = tuple(map(int,input().split()))

ans = 0
while True:
  if len(set((a,b,c)))<3:
    print(-1)
    break
  if 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
    ans+=1
    print(a,b,c)
  else:
    break
print(ans)
A,B,C=map(int,input().split())
if A==B==C:
    print(-1)
else:
    count=0
    while A%2==B%2==C%2==0:
        A,B,C=(B+C)/2,(C+A)/2,(A+B)/2
        count+=1
    print(count)
a, b, c = map(int, input().split())
if a == b == c:
    print(-1)
    exit()
for i in range(0, 10**5):
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(i)
        exit()
    a, b, c = (b+c) / 2, (c+a)/2, (a+b)/2
A, B, C = map(int,input().split())
c = 0

if A == B == C:
    c = -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
        c += 1

print(c)
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:
        total = a + b + c
        a = (total - a) / 2
        b = (total - b) / 2
        c = (total - c) / 2
        ans += 1
    print(ans)
a, b, c = map(int, input().split())
za = a
zb = b
zc = c

d = 0

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

while True:
    a = int(zb / 2) + int(zc / 2)
    b = int(za / 2) + int(zc / 2)
    c = int(za / 2) + int(zb / 2)

    za = a
    zb = b
    zc = c

    d += 1

    if a % 2 != 0 or b % 2 != 0 or b % 2 != 0:
        print(d)
        exit()
A,B,C = map(int,input().split())
if A*2 == B+C and B*2 == A+C and C*2 == A+B:
    print(-1)
    exit()
ans = 0
for i in range(10000):
    a = A//2
    b = B//2
    c = C//2
    if A%2 == 0 and B%2 == 0 and C%2 == 0:
        ans += 1
        A = b+c
        B = a+c
        C = a+b
    else:
        print(ans)
        exit()
a, b, c = map(int, input().split())

if a == b and a == c:
	print(-1)
	exit()
	
ans = 0
s, t, u = 0, 0, 0
while a%2==0 and b%2==0 and c%2==0:
	s = b//2 + c//2
	t = a//2 + c//2
	u = a//2 + b//2
	a, b, c = s, t, u
	ans += 1
	
print(ans)
A, B, C = map(int,input().split())

ans = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    if A == B and A == C:
        print(-1)
        exit()
    a = (B+C)//2
    b = (A+C)//2
    c = (A+B)//2
    A = a
    B = b
    C = c
    print(A,B,C)
    ans += 1

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

ListA = [A]*10000
ListB = [B]*10000
ListC = [C]*10000

for i in range (1, 10000):
	ListA[i]= ListB[i-1]/2+ListC[i-1]/2
	ListB[i]= ListA[i-1]/2+ListC[i-1]/2
	ListC[i]= ListA[i-1]/2+ListB[i-1]/2
	if ListA[i]%2==1 or ListB[i]%2==1 or ListC[i]%2==1:
			print(i)
			exit()

print(-1)
a,b,c=map(int,input().split())
cnt=0
if a==b==c:
  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)
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) or count > 31:
        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)
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

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

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

sabc = a+b+c

cnt = 0
while True:
    a = (sabc-a)/2
    b = (sabc-b)/2
    c = (sabc-c)/2
    cnt+=1
    if a%2==1 or b%2==1 or c%2==1: break

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

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

ans = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    a_tmp = b // 2 + c // 2
    b_tmp = a // 2 + c // 2
    c_tmp = a // 2 + b // 2
    a, b, c = a_tmp, b_tmp, c_tmp
    ans += 1

print(ans)
a, b, c = map(int, input().split())
cnt = 0
total = a + b + c
while True:
    if a == (total - a) // 2:
        cnt = -1
        break
    a = (total - a) // 2
    b = (total - b) // 2
    c = (total - c) // 2
    cnt += 1
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        break
print(cnt)
from fractions import gcd

if __name__ == "__main__":
    a, b, c = map(int, input().split())

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

    ab = abs(a-b)
    bc = abs(b-c)
    ca = abs(c-a)

    g = gcd(ab, bc)
    g = gcd(g, ca)

    ans = 0
    while g % 2 == 0:
        ans += 1
        g //= 2

    print(ans)
A, B, C = map(int, input().split())
ans = 0
if A == B and B == C:
    print(-1)
else:
    while A%2 == 0 and B%2 == 0 and 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())
e=a-b|b-c
print((e^b&1)*(e^e-1).bit_length()-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()
cnt=0
while a%2==0 and b%2==0 and c%2==0:
    a=(b+c)//2
    b=(c+a)//2
    c=(a+b)//2
    cnt+=1 
print(cnt)
a, b, c = map(int,input().split())
ans = 0
if a == b == c:
    if a%2 == 0:
        print(-1) #無限
    else:
        print(ans) #1回もできない

while True:
    ans += 1
    x = b//2 + c//2
    y = a//2 + c//2
    z = a//2 + b//2
    if x%2 == 1 or y%2 == 1 or z%2 == 1:
        break

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

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

i = 0
a_, b_, c_ = a, b, c

while a%2 == 0 and b%2 == 0 and c%2 == 0:
    i += 1
    a = b_//2 + c_//2
    b = a_//2 + c_//2
    c = a_//2 + b_//2
    a_, b_, c_ = a, b, c

print(i)
A,B,C = map(int, input().split())
ctr = 0
if A == B == C:
  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)
    ctr += 1
  print(ctr)
a,b,c = map(int,input().split())
ans = 0
while True:
    ans+=1
    na = (b+c)//2
    nb = (c+a)//2
    nc = (a+b)//2
    if na == a and nb == b and nc == c:
        ans = -1
        break
    if na%2 == 1 or nb%2 == 1 or nc%2 == 1:
        break
    a,b,c, = na,nb,nc
print(ans)
import sys

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

count = 0
while True:
    a = (A+B)//2
    b = (C+A)//2
    c = (A+B)//2
    count += 1
    if a == b and b == c and a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        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)
def resolve():
    A,B,C = map(int,input().split())
    count = 0
    if A + B == 2*C and A + C == 2*B:
        print(-1)
    else:
        while (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
            tmpA = (B + C) / 2 
            tmpB = (A + C) / 2 
            tmpC = (A + B) / 2
            A = tmpA
            B = tmpB
            C = tmpC
            count = count + 1
        print(count)
resolve()
A, B, C = [int(a) for a in input().split()]

count = 0

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

while 1:
    if A%2==0 and B%2==0 and C%2==0:
        A_tmp = B//2 + C//2
        B_tmp = A//2 + C//2
        C_tmp = A//2 + B//2
        A, B, C = A_tmp, B_tmp, C_tmp
        count += 1
    else:
        break
print(count)