peterverebics/CodeNet_Python_118 huggingface dataset:
a, b, c=map(int,input().split())
A,B,C = a,b,c
ans = 0
if(a%2 or b%2 or c%2):
  print(0)
  exit(0)
while(a%2==0 and b%2==0 and c%2==0):
  if(A==B==C):
    ans = -1
    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)
A, B, C = map(int, input().split())


def F(a, b, c):
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        return 0
    if a == b == c:
        return -1
    return F((a + b) // 2, (b + c) // 2, (c + a) // 2) + 1


print(F(A, B, C))
a,b,c = map(lambda x:int(x),input().split())
reps = 0
while a%2==0 and b%2==0 and c%2==0:
  if (a==b==c):
    reps = -1
    break
  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)
#13A - Cookie Exchanges
A,B,C = map(int, input().split())
cnt = 0
while (A%2 + B%2 + C%2) == 0:
    if A == B == C:
        print (-1)
        exit()
    else:
        a = B/2 + C/2
        b = A/2 + C/2
        c = A/2 + B/2
        A = a
        B = b
        C = c
        cnt += 1

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

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

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

else:
  cnt=0
  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)
import numpy as np
cookies = np.array([int(x) for x in input().split()])

if any(cookies%2):
  ans = 0
elif cookies[0] == cookies[1] == cookies[2]:
  ans = -1
else:
  ans = 0
  while True:
    if not any(cookies%2):
      cookies = cookies//2
      ans += 1
      continue
    if all(cookies%2):
      ans += 1
    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()
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())
count = 0
if a % 2 == 0 and a == b == c:
    print(-1)
    exit()

while a % 2 == 0 | b % 2 == 0 | c % 2 == 0:
    A = int((b + c) / 2)
    B = int((c + a) / 2)
    C = int((a + b) / 2)
    a = A
    b = B
    c = C
    count += 1
print(count)
A,B,C=map(int,input().split())
cnt=0
while True:
    if A % 2 == B % 2 == C % 2 == 1:
        break
    elif 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)
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:
    k=0
    while a%2==0 and b%2==0 and c%2==0:
        A=a
        B=b
        C=c
        a=B//2+C//2
        b=A//2+C//2
        c=A//2+B//2
        k+=1
    print(k)
a, b, c = map(int,input().split())

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

for i in range(10000):
    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
        ans += 1
    else:
        break

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

a1 = (b + c) / 2
b1 = (a + c) / 2
c1 = (a + b) / 2

diffs = [abs(a-a1), abs(b-b1), abs(c-c1)]

ans = []
for tmpdiff in diffs:
  count = 1
  while tmpdiff % 2 == 0:
    tmpdiff = tmpdiff / 2
    count += 1
    if tmpdiff == 0:
      count = -1
      break
      
  ans.append(count)

if not (a%2 ==0 and b%2 ==0 and c%2 ==0):
  print(0)
elif ans == [-1 for _ in range(len(ans))]:
  print(-1)
else:
  print(min([i for i in ans if i >0]))
A, B, C = list(map(int, input().split()))

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

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

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 = list(map(int, input().split()))

if a[0] % 2 == 1 or a[1] % 2 == 1 or a[2] % 2 == 1:
    print(0)
    exit()

cnt = 0
for _ in range(1000):
    for i in a:
        if i % 2 == 1:
            print(cnt)
            exit()
    a[0], a[1], a[2] = a[1] // 2 + a[2] // 2, a[0] // 2 + a[2] // 2, a[0] // 2 + a[1] // 2
    cnt += 1
else:
    print(-1)
import sys

input = sys.stdin.readline


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

    if A == B == C and A % 2 == 0:
        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())
num1=0
num2=0
num3=0
if a==b and b==c and a%2==0:
    print(-1)
else:
    for i in range(a*b*c):
        if a%2==1 or b%2==1 or c%2==1:
            break
        num1=a//2
        num2=b//2
        num3=c//2
        a=num2+num3
        b=num3+num1
        c=num1+num2
    print(i)
A, B, C = map(int, input().split())
cnt = 0
while A % 2 == B % 2 == C % 2 == 0:
    # print(A, B, C)
    if A == B == C:
        print(-1)
        break
    A, B, C = (B+C)//2, (C+A)//2, (A+B)//2
    cnt += 1
else:
    print(cnt)
a,b,c=map(int,input().split())
e=a-b|b-c
print((e!=b&1)*len(f'{e&-e:b}')-1)
A,B,C = map(int,input().split())
cnt=0

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

cnt = 0
while True:
   if a % 2 or b % 2 or c % 2:
      break
   cnt += 1
   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
print(cnt)
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

import numpy as np
a = np.array(ri_())
ans = 0
while True:
    if np.any(a % 2 == 1):
        break
    if a[0] == a[1] and a[1] == a[2]:
        ans = -1
        break
    a = (sum(a) - a) // 2
    ans += 1
print(ans)
A,B,C=map(int,input().split())
count=0
if A%2==0 and A==B and A==C:
  print("-1")
  exit()
while True:
  if A%2==1 or B%2==1 or C%2==1:
    break
  a,b,c=A/2,B/2,C/2
  A,B,C=b+c,a+c,a+b
  count+=1
print(count)
a, b, c = map(int, input().split())

cnt = 0

while True:
    if a % 2 == 1:
        print(cnt)
        exit()
    if b % 2 == 1:
        print(cnt)
        exit()
    if c % 2 == 1:
        print(cnt)
        exit()
    if a == b and a == c:
        print(-1)
        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())

def F(A,B,C):
    if any(x&1 for x in [A,B,C]):
        return 0
    if A == B == C:
        return -1
    return 1 + F((A+B)//2,(B+C)//2,(C+A)//2)

answer = F(A,B,C)
print(answer)
A, B, C = map(int,input().split())
ans = 0
while True:
  if A & 1 or B & 1 or C & 1: break 
  elif A == B and B == C:
    ans = -1
    break  
  else: 
    ans += 1
    A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2
print(ans)
def solve(a, b, c):
    if any(i % 2 == 1 for i in [a, b, c]):
        return 0
    if a == b == c:
        return -1
    a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2
    return solve(a, b, c) + 1

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

print(solve(a, b, c))
a,b,c=map(int,input().split())
d=0
while a%2==0 and b%2==0 and c%2==0:
    if a==b==c:
        print(-1)
        break
    d+=1
    ha=a//2
    hb=b//2
    hc=c//2
    a=hb+hc
    b=ha+hc
    c=ha+hb
else:print(d)
A,B,C=list(map(int,input().split()))
if A == B == C:
    if A%2==1 or B%2==1 or C%2==1:
        print(0)
        exit()
    else:
        print(-1)
        exit()
for i in range(10**9):
    if A%2==1 or B%2==1 or C%2==1:
        print(i)
        exit()
    A,B,C=(B+C)//2,(A+C)//2,(A+B)//2
A, B, C = map(int, input().split())

for i in range(36):
    if A % 2 or B % 2 or C % 2:
        break

    tA = (B + C) // 2
    tB = (A + C) // 2
    tC = (B + A) // 2
    A = tA
    B = tB
    C = tC
else:
    i = -1

print(i)
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)
    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())
res = 0
while a%2==0 and b%2==0 and c%2==0: # 値が偶数の間
    if a==b==c: #無限ループ
        print(-1)
        exit()
    tmpa = b//2+c//2
    tmpb = a//2+c//2
    tmpc = a//2+b//2
    a = tmpa
    b = tmpb
    c = tmpc
    res += 1
print(res)
A,B,C = map(int,input().split())
if A == B and  B == C and C == A:
  print(-1 if A%2==0 else 0 )
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)
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 // 2 + C // 2, A // 2 + C // 2, A // 2 + B // 2
        cnt += 1


print(solve())
A,B,C=map(int, input().split())
for i in range(1000000):
    if A&1 or B&1 or C&1:
        print(i)
        break
    A,B,C=B//2+C//2,A//2+C//2,A//2+B//2
else:
    print(-1)
a, b, c = map(int, input().strip().split())

count = 0

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

    count += 1
    a1 = b // 2 + c // 2
    b1 = c // 2 + a // 2
    c1 = a // 2 + b // 2

    a, b, c = a1, b1, c1

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

times = 0
if a == b and b == c and a % 2 == 0:
    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,open(0).read().split())
e=(a-b)|(b-c)
print(bool(e|(a|b|c)%2)*(e^~-e).bit_length()-1)
A, B, C = map(int, input().split())

if A==B==C:
    if A%2==0:
        print(-1)
    else:
        print(0)

else:
    for i in range(1000000000):
        if A %2==0 and B%2==0 and C%2==0:
            a = A/2
            b = B/2
            c = C/2
            A = b+c
            B = a+c
            C = a+b
        else:
            print(i)
            exit()
A, B, C = map(int, input().split())
sum = 0
before = set()
while True:
    if str(A)+' '+str(B)+' '+str(C) in before:
        print(-1)
        exit()
    else:
        before.add(str(A)+' '+str(B)+' '+str(C))
    if A%2==1 or B%2==1 or C%2==1:
        print(sum)
        exit()
    temp1 = int(B/2)+int(C/2)
    temp2 = int(A/2)+int(C/2)
    temp3 = int(A/2)+int(B/2)
    A, B, C = temp1, temp2, temp3
    sum += 1
a,b,c = map(int, input().split(" "))
pr=True
count=0
while(a%2==0 and b%2==0 and c%2==0):
    ta,tb,tc=a,b,c
    a=tb/2+tc/2
    b=ta/2+tc/2
    c=ta/2+tb/2
    count += 1
    if ta == a and tb == b and tc == c:
        print(-1)
        pr=False
        break
if pr:
    print(count)
a, b, c = map(int, input().split())

if a%2 == 0 and 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())
ans = 0
p = 0

for i in range(c):
    if int(a/2)*2==a and int(b/2)*2==b and int(c/2)*2==c:
        if a == b and b == c:
            break
        ans += 1
        x = b / 2 + c / 2
        y = a / 2 + c / 2
        z = b / 2 + a / 2
        a = x
        b = y
        c = z

    else:
        p = 1
        print(ans)
        break



if p == 0:
    print(-1)
import math
A,B,C = map(int,input().split())

ans = 0
while(1):
  tmp_A,tmp_B,tmp_C = A,B,C
  if((tmp_A%2 == 1)or(tmp_B%2 == 1)or(tmp_C%2 == 1)):
    break   
  A,B,C = (tmp_B+tmp_C)//2, (tmp_C+tmp_A)//2, (tmp_A+tmp_B)//2
  if((tmp_A == A)and(tmp_B == B)and(tmp_C == C)):
    ans = -1
    break
  ans += 1

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

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

count = 0
while True:
    if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
        print(count)
        exit()

    nA = (B + C) // 2
    nB = (A + C) // 2
    nC = (A + B) // 2
    count += 1
    A, B, C = nA, nB, nC
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
        ta = a//2
        tb = b//2
        tc = c//2
        a = tb + tc
        b = ta + tc
        c = ta + tb
        if a == b == c:
            ans = -1
            break
    print(ans)

if __name__ == '__main__':
    main()
a,b,c=map(int,input().split());print(len(bin((e:=a-b|c-b)&-e))-3or~c%-2)
import numpy as np
import sys

input = sys.stdin.readline

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


if A == B == C and A%2 == 0 and B%2 == 0 and C%2 == 0:
    ans = -1
else:
    ans = 0
    while A%2 == 0 and B%2 == 0 and C%2 == 0:
        next_a = C/2 + B/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)
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 and A%2==0 and B%2==0 and C%2==0:
    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())
ans = 0
if a == b == c:
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        pass
    else:
        ans = -1
else:
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        ans += 1
        a, b, c = (b+c)//2, (a+c)//2, (a+b)//2
print(ans)
import sys
A, B, C = [int(x) for x in input().split()]
ans = 0
if(A==B==C)and(A%2==0)and(B%2==0)and(C%2==0):
  print(-1)
  sys.exit()
while (A%2==0)and(B%2==0)and(C%2==0):
  a = B/2 + C/2
  b = C/2 + A/2
  c = A/2 + B/2
  A, B, C = a, b, c
  ans += 1
print(ans)
#!/usr/bin/env python3
a, b, c = map(int, input().split())
o = 0
if a == b == c:print(a%2-1);exit() 
while 1-any([a%2, b%2, c%2]):
    a, b, c = (b+c)//2, (c+a)//2, (a+b)//2
    o += 1
print(o)
def calculate(A, B, C):
    for i in range(1000):
        if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
            return i
        else:
            _A = (B + C) // 2
            _B = (A + C) // 2
            _C = (A + B) // 2
            A, B, C = _A, _B, _C
    return -1

A, B, C = map(int, input().split())
print(calculate(A, B, C))
A, B, C = [int(x) for x in input().split()]
ans = 0
while True:
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        break
    elif A == B == C:
        ans = -1
        break
    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
while A%2==0 and B%2==0 and C%2==0:
    if A == B == C:
        print(-1)
        exit()
    A1=A
    B1=B
    C1=C
    A = B1/2+C1/2
    B = A1/2+C1/2
    C = A1/2+B1/2
    ans +=1
print(ans)
A,B,C = map(int,input().split())

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

cnt=0
while(A%2==B%2==C%2==0):
  _A=A;_B=B;_C=C
  A=_B//2+_C//2
  B=_A//2+_C//2
  C=_B//2+_A//2
  cnt+=1
  #print(cnt,A,B,C)
print(cnt)
A, B, C = map(int,input().split())

if B %2 != 0:
    print(0)
    exit()
if A == B == C:
    print(-1)
    exit()

x = B/2
cnt = 0
while A % 2 == 0 and C % 2 == 0:
    tmp_a = A
    tmp_c = C
    A = tmp_c/2 + x
    C = tmp_a/2 + x
    cnt += 1
print(cnt)
a, b, c = map(int, input().split())
ans = 0
if a == b == c and a != 1:
  ans = -1
else:
  while a % 2 == b % 2 == c % 2 == 0:
    x = a // 2
    y = b // 2
    z = c // 2
    if x % 2 == y % 2 == z % 2:
      a = y + z
      b = z + x
      c = z + x
      ans += 1
    else:
      ans += 1
      break
print(ans)
def resolve():
    A, B, C = map(int, input().split())
    cnt = 0
    while True:
        if A%2 == 1 or B%2 == 1 or C%2 == 1:
            break
        elif A==B and B==C:
            cnt = -1
            break
        Atmp = A
        Btmp = B
        Ctmp = C
        A = (Btmp+Ctmp)/2
        B = (Atmp+Ctmp)/2
        C = (Atmp+Btmp)/2
        cnt += 1
    print(cnt)
resolve()
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==b%2==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())
ans = 0

if not (A % 2 == 0 and B % 2 == 0 and C % 2 == 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:
  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 - Cookie Exchanges
A, B, C = map(int, input().split())
if not (A%2 == B%2 == C%2 == 0):
    ans = 0
elif A == B == C:
    ans = -1
else:
    ans = 0
    while A%2 == B%2 == C%2 == 0:
        a = (B+C) // 2
        b = (C+A) // 2
        c = (A+B) // 2
        A = a
        B = b
        C = c
        ans += 1
print(ans)
A, B, C = map(int, input().split())

i = 0
Ap = A
Bp = B
Cp = C
while A%2 == 0 and B%2 == 0 and C%2 == 0:
  A = Bp//2 + Cp//2 
  B = Ap//2 + Cp//2 
  C = Bp//2 + Ap//2 
  i += 1
  Ap = A
  Bp = B
  Cp = C
  if A == B == C:
    i = -1
    break


print(i)
import sys
A, B, C = map(int, input().split())

def isodd(x):
    if x % 2 == 1:
        return True
    else:
        return False

if isodd(A) or isodd(B) or isodd(C):
    print(0)
    sys.exit()
res = 0
while not isodd(A) and not isodd(B) and not isodd(C):
    if A == B == C:
        print(-1)
        sys.exit()
    tA, tB, tC = A, B, C
    A = tB//2 + tC//2
    B = tA//2 + tC//2
    C = tA//2 + tB//2
    res += 1
print(res)
A, B, C = map(int,input().split())
c = 0

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

    if A == B == C:
        c = -1
        break

print(c)
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:
        cnt = -1
        print(cnt)
else:
    while True:
        a, b, c = A, B, C
        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
        cnt += 1
    
    print(cnt)
A,B,C = list(map(int,input().split()))
count = 0
if A%2 == 1 or B%2 == 1 or C%2 == 1:
    print(0)
    exit()
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())


count = 0
while True:
    if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
        print(count)
        break
    if A == B == C:
        print(-1)
        break
    A, B, C = B // 2 + C // 2, A // 2 + C // 2, A // 2 + B // 2
    count += 1
A,B,C=map(int,input().split())

k=0
if A%2==B%2==C%2==0 and A==B==C:
    k=-1
else:
    while A%2==B%2==C%2==0:
        a=A
        b=B
        c=C
        A=(b+c)/2
        B=(a+c)/2
        C=(a+b)/2
        k+=1

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

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

a=0
D=set()
while True:
    if A%2!=0 or B%2!=0 or C%2!=0:
        break
    if (A,B,C) in D:
        a=-1
        break
    else:
        D.add((A,B,C))
    p=(B+C)/2
    q=(A+C)/2
    r=(A+B)/2
    A=p;B=q;C=r
    a+=1
print(a)
A,B,C = map(int, input().split())

def even(a):
	if a % 2 == 0:
		return True
	else:
		return False

cnt = 0

while even(A) and even(B) and even(C):
	if A == B and B == C:
		cnt = -1
		break
	else:
		tmp1, tmp2, tmp3 = A,B,C
		A = (tmp2+tmp3) // 2
		B = (tmp3+tmp1) // 2
		C = (tmp1+tmp2) // 2
		cnt += 1

print(cnt)
def existOdd(lst):
    for i in lst:
        if i%2==1:
            return False
    return True

cookie=list(map(int,input().split()))
seen=[]
res=0
while existOdd(cookie):
    seen.append(cookie)
    cookie=[cookie[1]/2+cookie[2]/2,cookie[0]/2+cookie[2]/2,cookie[0]/2+cookie[1]/2]
    if cookie in seen:
        res=-1
        break
    res+=1

print(res)
a,b,c  = map(int, input().split())
INF = 10**4
cnt = 0
while a%2==0 and b%2==0 and c%2==0:
    # print(cnt)
    if cnt == INF:
       print(-1)
       exit()
    x = a + (b+c)//2
    y = b + (c+a)//2
    z = c + (a+b)//2
    a,b,c = x,y,z
    cnt+=1
print(cnt)
a, b, c = map(int, input().split())

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

cnt = 0
while True:
    if a0%2==1 or b0%2==1 or c0%2==1:
        print(cnt)
        exit()

    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 == a and b1 == b and c1 == c:
        print(-1)
        exit()
l = list(map(int,input().split()))
ans = 0
if l[0] == l[1] == l[2] and all(i % 2 == 0 for i in l):
  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)
import sys
A,B,C = map(int,input().split())
result = 0
if A * B * C % 2 == 1:
  print(0)
  sys.exit()
elif A == B and B == C:
  print(-1)
  sys.exit()
else:
  while A % 2 == B % 2 and B % 2 == C % 2 and C % 2 == 0:
    a = (B + C) // 2
    b = (C + A) // 2
    c = (A + B) // 2
    A,B,C = a,b,c
    result += 1
print(result)
a,b,c = map(int,input().split())
cou = 0
if  a%2==0 and 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)
from time import time
t = time()
count = 0
a,b,c = map(int,input().split())
while True:
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        print(count)
        exit()
    count += 1
    a1 = b//2+c//2
    b1 = c//2+a//2
    c1 = a//2+b//2
    a = a1
    b = b1
    c = c1
    if time()-t >= 1.8:
        print(-1)
        exit()
A,B,C=map(int,input().split())

count=0
while True:
  if A==B and B==C:
    if A%2 == 0:
      count=-1
    break
  elif A%2==1 or B%2==1 or C%2==1:
    break
  else:
    A,B,C=(B+C)//2,(A+C)//2,(A+B)//2
    count+=1
  pass
print(count)
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
    print(num)