peterverebics/CodeNet_Python_118 huggingface dataset:
a,b,c = map(int,input().split())
y = 2
x = 0
i = 0
if a == b and b==c:
  print(-1)
elif a % 2 != 0 or b % 2 !=0 or c % 2 != 0:
  print(0)
else:  
  while y in range(2,10001,y):
    d = (a/(2))/y
    f =(c/(2))/y          
    e = (b/2)/y
    if d % 1 == 0:
      x += 1    
    if e % 1 == 0:
      x += 1
    if f % 1 == 0:
      x += 1
    y = 2**i
  print(x)
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:
    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())
e=a-b|b-c
print(len(bin(e&-e))-3or~b%-2)
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


l = list(map(int, input().split()))
l.sort()
a,b,c = l
ans = 0
while True:
    if a==b==c:
        ans = -1
        break
    if a%2 or b%2 or c%2:
        break
    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 == c):
    print(-1)
    quit()

count = 0
while(a % 2 == 0 and b % 2 == 0 and c % 2 == 0):
    _a = b / 2 + c /2
    _b = a / 2 + c /2
    _c = a / 2 + b /2
    a = _a
    b = _b
    c = _c
    count += 1
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=a
        tb=b
        tc=c
        a=(tb/2)+(tc/2)
        b=(ta/2)+(tc/2)
        c=(ta/2)+(tb/2)
        ans+=1
    print (ans)
a, b, c = map(int, input().split())
ans = 0

if a == b == c:
    print(-1)
elif not (a % 2 == 0 and b % 2 == 0 and c % 2 == 0):
    print(ans)
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)
def solve(A, B, C):
    if (A % 2 == 1 or B % 2 == 1 or C % 2 == 1):
        return 1
    elif (A == B == C):
        return -1
    else:
        return solve((B/2 + C/2), (A/2 + C/2), (A/2 + B/2)) + 1 

A, B, C = map(int, input().split())
ans = solve(A, B, C)
print(ans)
a,b,c = map(lambda x:int(x),input().split())
if a==b==c:
  print(-1)
else:
  reps = 0
  while a%2==0 and b%2==0 and c%2==0:
    at=a
    bt=b
    ct=c
    a = int(bt/2+ct/2)
    b = int(at/2+ct/2)
    c = int(at/2+bt/2)
    reps += 1
  print(reps)
a, b, c = map(int, input().split())
i = 0
while a%2==0 and b%2==0 and c%2==0 and i<10**8:
    at = a//2
    bt = b//2
    ct = c//2
    a = bt + ct
    b = at + ct
    c = at + bt
    i+=1
if i > 10**8:
    print(-1)
else:
    print(i)
# A - Cookie Exchanges

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

def div2(x):
    ans = 0
    while x>0 and x%2==0:
        x /= 2
        ans += 1
    return ans

if A==B and B==C:
    print(-1)
else:
    print(min(div2(abs(A-B)), div2(abs(A-C))))
# 解答AC

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

is_even = lambda n: True if n % 2 == 0 else False

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

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

cnt = 0
while(True):
    half_a, half_b, half_c = a / 2, b / 2, c / 2
    ea = half_a % 2 == 0
    eb = half_b % 2 == 0
    ec = half_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, b, c=map(int, input().split())
if a==b and b==c:
  print(-1)
else:
  cnt=0
  for i in range(1000):
    if a%2==1 or b%2==1 or c%2==1:
      print(cnt)
      break
    if i==1000:
      print(-1)
    cnt+=1
    ha=a/2
    hb=b/2
    hc=c/2
    a=hb+hc
    b=ha+hc
    c=ha+hb
A,B,C = map(int,input().split())

if A == 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//2 + bc//2
    B = ba//2 + bc//2
    C = ba//2 + bb//2
    c+=1
  print(c)
A, B, C = map(int, input().split())

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

res = 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
    res += 1

print(res)
A, B, C = map(int, input().split())
if A == B == C:
  print(-1)
else:
  D = 0
  while A%2 == 0 and B%2 == 0 and C%2 == 0:
    D += 1
    AA = B/2 + C/2
    BB = A/2 + C/2
    CC = A/2 + B/2
    A = AA
    B = BB
    C = CC
  print(D)
a,b,c=map(int,input().split())
flag=0
if (a==b==c):
  print(-1)
elif (a%2==1 or b%2==1 or c%2==1):
  print(0)
else:
  for i in range(1,10**9):
    a,b,c=(b//2+c//2),(a//2+c//2),(a//2+b//2)
    #print(a,b,c)
    if (a%2==1 or b%2==1 or c%2==1):
      print(i)
      flag=1
      break
if (flag==0):
  print(-1)
# -*- coding:utf-8 -*-
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:
        A,B,C = (B+C)//2,(C+A)//2,(A+B)//2 
        cnt += 1

print(cnt)
A, B, C = map(int, input().split())
ans = 0
cont = True
while cont:
    if A == B == C:
        ans = -1
        break
    elif A%2==0 and B%2==0 and C%2==0:
        b_A = A
        b_B = B
        b_C = C
        A = b_B//2 + b_C//2
        B = b_A//2 + b_C//2
        C = b_A//2 + b_B//2
        ans += 1
    else:
        break
print(ans)
a, b, c = map(int, input().split())

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

while True:
  if any([a & 1, b & 1, c & 1]):
    break
    
  a2 = a // 2
  b2 = b // 2
  c2 = c // 2
  a = b2 + c2
  b = a2 + c2
  c = a2 + b2
  result += 1

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

if a == b == c:
    print(-1)
    quit()
ans = 0
a_n = 0
b_n = 0
c_n = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    a_n = (b+c)//2
    b_n = (a+c)//2
    c_n = (a+c)//2
    a = a_n
    b = b_n
    c = c_n
    ans += 1
print(ans)
a, b, c = map(int, input().split())

a0, b0, c0 = a, b, c
a1, b1, c1 = 0, 0, 0

cnt = 0
while True:
    a1 = b0/2 + c0/2
    b1 = a0/2 + c0/2
    c1 = a0/2 + c0/2

    a0 = a1
    b0 = b1
    c0 = c1

    cnt += 1

    if a1%2==1 or b1%2==1 or c1%2==1:
        print(cnt)
        exit()

    if a1 == a and b1 == b and c1 == c:
        print(-1)
        exit()
i = 0

def cookie(a, b, c):
    global i
    if a == b and b == c:
        return -1
    elif a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        i += 1
        cookie((b+c)//2, (a+c)//2, (a+b)//2)
        return i

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

for _ in range(100):
    cnt+=1
    new_A=B/2+C/2
    new_B=A/2+C/2
    new_C=A/2+B/2
    A,B,C=new_A,new_B,new_C
    if new_A%2==1 or new_B%2==1 or new_C%2==1:
        print cnt
        quit()
else:
    print -1
a,b,c=map(int,input().split())
flag=0
if (a==b==c):
  print(-1)
  flag=1
elif (a%2==1 or b%2==1 or c%2==1):
  print(0)
  flag=1
else:
  for i in range(1,10**9):
    a,b,c=(b//2+c//2),(a//2+c//2),(a//2+b//2)
    #print(a,b,c)
    if (a%2==1 or b%2==1 or c%2==1):
      print(i)
      flag=1
      break
if (flag==0):
  print(-1)
a,b,c = map(int,input().split())

if (a == b ) and (b == c):
  print(-1)
elif (a%2!=0) or (b%2!=0) or (c%2!=0):
  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 == c:
    print(-1)
for i in range(1, 10**5):
    a, b, c = (b+c) / 2, (c+a)/2, (a+b)/2
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(i)
        exit()
# A - Cookie Exchanges
a,b,c = map(int,input().split())
INF = 10000

def div2(x):
    ans = 0
    if x==0:
        return INF
    while x%2==0:
        ans += 1
        x //= 2
    return ans

ans = min(div2(abs(b-a)), div2(abs(c-b)))
print(ans if ans<INF else -1)
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 % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        break
    if a == b and b == c:
        print('-1')
        sys.exit()
    A = a
    B = b
    C = c

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

if (a == b ) and (b == c):
  print(-1)
elif (a%2!=0) and(b%2!=0) and(c%2!=0):
  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==c:
    print(-1)
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())
cnt=0
while True:
  if A==B and A==C:
    print(-1)
    exit(0)
  if not (A%2==0 and B%2==0 and C%2==0):
    break
  cnt+=1
  A=A//2
  B=B//2
  C=C//2
  Aa=B+C
  Bb=A+C
  Cc=A+B
  A=Aa
  B=Bb
  C=Cc
print(cnt)
a,b,c = map(int, input().split())
print(min(bin(abs(a-b))[::-1].find('1'),bin(abs(b-c))[::-1].find('1')))
def ave(b,c):
    return b//2 + c//2
def rest(a,b,c):
    return ave(b,c), ave(a,c), ave(b,a)
a, b, c = map(int, input().split())
ans = 0
while 1:
    d, e, f = rest(a,b,c)
    if (a, b, c) == (d, e, f):
        print(-1)
        break
    ans += 1
    a, b, c = d, e, f
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1 :
        print(ans)
        break
a , b , c = map(int, input().split())
count = 0
if a == b and a == c:
  count = -1
else:
  while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    a_copy = a
    b_copy = b
    c_copy = c
    a = int(b_copy / 2 + c_copy / 2)
    b = int(a_copy / 2 + c_copy / 2)
    c = int(b_copy / 2 + a_copy / 2)
    count += 1
  
print(count)
a, b, c = map(int, input().split())

test = [[a,b,c]]
count = 0
while a%2 == b%2 == c%2 == 0:
    at = a
    bt = b
    ct = c
    a = bt//2 + ct//2
    b = ct//2 + at//2
    c = at//2 + bt//2
    count+=1
    if [a,b,c] in test:
        print(-1)
        break
    else:
        test.append([a,b,c])
if test != [a,b,c]:
    print(count)
a,b,c=map(int,input().split())
e=a-b|b-c
print((e!=b%2)*(e&-e).bit_length()-1)
import random as rng
import itertools as it
import collections as col
import heapq as hq
import sys
import copy as cp
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def dump_impl(*objects):
    print(*objects, file=sys.stderr)


def dump_dummy(*objects):
    pass


dump = dump_impl if "DEBUG" in sys.argv else dump_dummy


def odd(n): return n & 1


def even(n): return not odd(n)

S = input()
dump(S)
print(S)
a,b,c=map(int,input().split())
if a==b==c:
    print(-1)
    exit()
cnt=0
while True:
    x=b/2+c/2
    y=a/2+c/2
    z=a/2+b/2
    a,b,c = x,y,z
    cnt+=1
    if a%2 != 0 or b%2 != 0 or c%2 !=0:
        break
print(cnt)
A,B,C = map(int,input().split())

def operation(a,b,c):
    a_ = (b+c)/2
    b_ = (a+c)/2
    c_ = (a+b)/2
    return a_,b_,c_

if A == B == C:
    print(-1)
else:
    r = 0
    while A%2 == 0 and B%2 == 0 and C%2 == 0:
        A,B,C = operation(A,B,C)
        r += 1
    print(r)
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)
elif a%2!=0 or b%2!=0 or c%2!=0:
  print(0)
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())

def main(a,b,c):
  if a == b and b == c:
    return -1
  
  cnt = 0
  while True:
    #print(a,b,c)
    a1,b1,c1 = a,b,c
    a = (b1+c1)//2
    b = (a1+c1)//2
    c = (a1+b1)//2
    cnt += 1
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
      return cnt    
    

ans = main(A,B,C)
print(ans)
a, b, c = map(int, input().split())
a_tmp = a ; b_tmp = b ; c_tmp = c
count = 0
while True :
    count += 1
    a = b_tmp/2 + c_tmp/2
    b = a_tmp/2 + c_tmp/2
    c = a_tmp/2 + b_tmp/2
    if a == a_tmp and b == b_tmp and c == c_tmp :
        print("-1")
        break
    a_tmp = a ; b_tmp = b ; c_tmp = c
    if a%2 == 1 or b%2 == 1 or c%2 == 1 :
        print(count)
        break
    else :
        continue
a, b, c = map(int, input().split())

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

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

N = (a+b+c)//3
cnt = 1
while N:
    if N%2!=0: break
    N //= 2
    cnt += 1
    
print(cnt)
a, b, c=map(int, input().split())
if a==b and b==c:
  print(-1)
else:
  cnt=0
  for i in range(10000):
    if a%2==1 or b%2==1 or c%2==1:
      print(cnt)
      break
    if i==10000:
      print(-1)
    cnt+=1
    ha=a/2
    hb=b/2
    hc=c/2
    a=hb+hc
    b=ha+hc
    c=ha+hb
A, B, C = map(int, input().split())
if A == B == C:
  print(-1)
else:
  count = 0
  while not (A == B == C) and (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))
  if A == B == C:
    print(-1)
  else:
    print(count)
A, B, C = map(int,input().split())

empty = [0] * 3
count = 0
if (A == B == C):
    print(-1) 
elif (A % 2 != 0) or (B % 2 != 0) or (C % 2 != 0):
    print(0)
else:
    while A % 2 == 0 and B % 2 == 0 and C % 2 == 0: 
        count += 1
        A_ = A//2
        B_ = B//2
        C_ = C//2
        A = B_ + C_
        B = A_ + C_
        C = A_ + B_

    print(count)
a, b, c = list(map(int, input().split()))
if a == b == c:
    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 - Cookie Exchanges
a,b,c = map(int,input().split())
INF = 10000

def div2(x):
    ans = 0
    if x==0:
        return INF
    while x%2==0:
        ans += 1
        x //= 2
    return ans

ans = min(div2(abs(b-a)), div2(abs(c-b)), div2(abs(a-c)))
print(ans if ans<INF else -1)
a, b, c = map(int, input().split())

times = 0
if a == b and b == c:
    print(-1)
else:
    while 1:
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            break
        a, b, c = int((b + c)/2), int((c + a)/2), int((a + b)/2)
        times += 1

    print(times)
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())
if a==b and b==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
    if a%2==1 or b%2==1 or c%2==1:
        ans=i
        break
print(ans)
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)
cookie = list(map(int, input().split()))
sc = sum(cookie)
cnt = -1
if cookie[0] == cookie[1] and cookie[1] == cookie[2] and cookie[0]%2 == 0:
    print(-1)
    exit()
memo = [0]*3
while cookie[0]%2 == 0 and cookie[1]%2 == 0 and cookie[2]%2 == 0:
    memo[0] = (cookie[1] + cookie[2]) // 2
    memo[1] = (cookie[0] + cookie[2]) // 2
    memo[2] = (cookie[1] + cookie[0]) // 2
    for i in range(3):
        cookie[i] = memo[i]
    cnt += 1

print(cnt)
import sys
import numpy as np
a, b, c = [int(i) for i in sys.stdin.readline().split()]
if a == b == c:
    print(-1)
else:
    ls = np.array([a, b, c])
    arr = np.array([[0, 0.5, 0.5],
                    [0.5, 0, 0.5],
                    [0.5, 0.5, 0]])
    cnt = 0
    while sum(ls % 2) == 0:
        ls = ls.dot(arr)
        cnt += 1
    print(cnt)
A,B,C = list(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:
        break
    A_half = A//2
    B_half = B//2
    C_half = C//2
    A = B_half+C_half
    B = A_half+C_half
    C = A_half+B_half
    count += 1
print(count)
a,b,c = map(int,input().split())
cnt=0
for i in range(100):
    if a==b==c:
        cnt = -1
        break
    elif a%2==0 and b%2==0 and c%2==0:
        t_a = b//2 + c//2
        t_b = a//2 + c//2
        t_c = a//2 + b//2
        a,b,c = t_a,t_b,t_c
        cnt+=1
    else:
        break
print(cnt)
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:
  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==b==c and a%2==0:
    print(-1)
else:
    num=0
    while True:
        if a%2==1 or b%2==1 or c%2==1:
            break
        num+=1
        l0=(b+c)/2
        l1=(c+a)/2
        l2=(a+b)/2
        a,b,c=l0,l1,l2
    else:
        print(num)
a, b, c = map(int, input().split())
count = 0
for i in range(10**3):
    a, b, c = b/2 + c/2, a/2 + c/2, a/2 + b/2
    count += 1
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        print(count)
        exit()
print(-1)
a, b, c = map(int, input().split())

if(a == b and b == c):
    print(-1)
else :
    cnt = 0
    while True:
        if(a % 2 != 0 or b % 2 != 0 or c % 2 != 0):
            break
        A = b//2 + c//2
        B = c//2 + a//2
        C = a//2 + b//2
        a = A
        b = B
        c = C
        cnt += 1
    print(cnt)
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+c)//2
    bcnt = (a+c)//2
    ccnt = (a+b)//2
    a = acnt
    b = bcnt 
    c = ccnt
    cnt += 1

print(cnt)
# A - Cookie Exchanges
a,b,c = map(int,input().split())

if a==b==c:
    print(-1)
else:
    ans = 0
    while a%2==b%2==c%2==0:
        ans += 1
        a,b,c = (b+c)//2,(c+a)//2,(a+b)//2
    print(ans)
cookie = list(map(int, input().split()))
sc = sum(cookie)
cnt = -1
if cookie[0] == cookie[1] and cookie[1] == cookie[2]:
    print(cnt)
    exit()
memo = [0]*3
while sum(cookie) == sc:
    memo[0] = (cookie[1] + cookie[2]) // 2
    memo[1] = (cookie[0] + cookie[2]) // 2
    memo[2] = (cookie[1] + cookie[0]) // 2
    for i in range(3):
        cookie[i] = memo[i]
    cnt += 1

print(cnt)
import sys

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

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 (a % 4 == 0 and b % 4 == 0 and c % 4 == 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)
a,b,c = map(int, input().split())
count = 0
if not a==b==c:
    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 = list(map(int,input().split()))
cna = cnb = 0
a.sort()
x = a[2]-a[1]
y = a[1]-a[0]
while True:
    if x%2 == 0 and x != 0:
        cna += 1
        x //= 2
    else:
        break
while True:
    if y%2 == 0 and y != 0:
        cnb += 1
        y //= 2
    else:
        break
if cna == 0 or cnb == 0:
    print(-1)
else:
    print(min(cna,cnb))
import sys
a,b,c = map(int,input().split(" "))
li = [[a,b,c]]
if (a % 2)==1 or (b % 2)==1 or (c % 2)==1:
  print(0)
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)
li = list(map(int,input().split()))
nx = [0,0,0]
ans = 0
if any(x&1 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)
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
  if A == B == C:
    ans = -1
    break
print(ans)
a,b,c = tuple(map(int,input().split()))
if len(set((a,b,c)))==1 and a//2==1:
    print(0)
    exit()
ans = 0
while True:
  if len(set((a,b,c)))==1:
    print(-1)
    exit()
  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
  else:
    break
print(ans)
#13
a,b,c = map(int,input().split())
cnt = 0
if  a%2 == 1 or b%2 == 1 or c%2 == 1:
    print('0')
    
else:
    while a%2 == b%2 == c%2 == 0:
        if a==b==c:
            print('-1')
            break
        else:
            a,b,c = b//2+c//2,c//2+a//2,a//2+b//2
            cnt+=1
    print(cnt)
a,b,c=map(int,input().split())
for i in range(500000):
    if a%2==1 or b%2==1 or c%2==1:
        print(i);exit()
else:
    print(-1)
a,b,c=map(int,input().split())

ans=0
if a==b==c:
  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())
A,B,C = a,b,c
ans = 0
while(a%2==0 and b%2==0 and c%2==0):
  if(A==B==C):
    ans = 0
    break
  A,B,C = a,b,c
  a = B//2 + C//2
  b = A//2 + C//2
  c = A//2 + B//2
  ans += 1
print(ans) if(ans) else print(-1)
A,B,C=map(int,input().split())
if A==B and B==C:
	print(-1)
	exit()
else:
	count=0
	while(1):
		if A%2==1 or B%2==1 or C%2==1:
			print(count)
			exit()
		else:
			a=A//2
			b=B//2
			c=C//2
			A=b+c
			B=a+c
			C=a+b
			count+=1
a,b,c= map(int,input().split())
cnt = 0
if a == b and b == c:
    print(-1)
    exit()
while a%2 == 0 and b%2 == 0 and c%2 == 0:
    cnt +=1
    x =(b+c)//2
    y =(c+a)//2
    z =(b+a)//2
    a = x
    b = y
    c = z
print(cnt)
import re
A,B,C = map(int,input().split())
#N = str(input())
#K = int(input())
#A = list(map(int,input().split()))
if A==B==C:
    print(-1)
    exit()
flag=True
co=0
if A%2!=0 or B%2!=0 or C%2!=0:
    flag=False
while flag==True:
    co+=1

    a=B/2 + C/2
    b=A/2 + C/2
    c=B/2 + A/2
    if a%2!=0 or b%2!=0 or c%2!=0:
        flag=False
    A=a
    B=b
    C=c

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

if A == B and B == C:
    print(-1)
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
a,b,c=map(int,input().split())
if a==b==c:
    print(-1)
    exit()
ans=0
while a%2==b%2==c%2==0:
    x=(a+b)//2
    y=(b+c)//2
    z=(c+a)//2
    a=y
    b=z
    c=a
    ans+=1
print(ans)
A,B,C = map(int,input().split())
ans = 0
if A == B == C and A%2 == 0 or B%2 == 0 or C%2 == 0:
  ans = -1
else:
  while A%2 == 0 and B%2 == 0 and C%2 == 0:
    if A == B == C:
      ans = -1
      break
    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 == C:
    print(-1)
else:
    cnt = 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
        cnt += 1
    print(cnt)