peterverebics/CodeNet_Python_118 huggingface dataset:
l = list(map(int, input().split()))
ans = 0
while( l[0]%2==0 and l[1]%2==0 and l[2]%2==0):
    if l[0]==l[1]and l[1]==l[2]:
        ans = -1
        break
    else:
        a = l[0]
        b = l[1]
        c = l[2]
        l[0]=(b+c)/2
        l[1]=(a+c)/2
        l[2]=(a+b)/2
        ans+=1
print(ans)
def main():
    A,B,C=map(int,input().split())
    ans=0
    tmp=set()
    while A%2==0 and B%2==0 and C%2==0:
        A,B,C=(B+C)//2,(C+A)//2,(A+B)//2
        if (A,B,C) in tmp:
            print(-1)
            exit()
        else:
            tmp.add((A,B,C))
        ans += 1
    print(ans)

main()
a,b,c = map(int, input().split())
if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
  print(0)
else:
  for i in range(10**6):
    temp1 = a
    temp2 = b
    temp3 = c
    a = int((temp2+temp3)/2)
    b = int((temp1+temp3)/2)
    c = int((temp1+temp2)/2)
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
      break
  if i == 10**6 - 1:
    print(-1)
  else:
    print(i+1)
A, B, C = map(int, input().split())
cnt = 0
while(1):
    if A%2!=0 or B%2!=0 or C%2!=0:
        break
    A_tmp = A
    B_tmp = B
    C_tmp = C
    A = (B_tmp+C_tmp)/2
    B = (A_tmp+C_tmp)/2
    C = (A_tmp+C_tmp)/2
    cnt += 1
    if A_tmp==A and B_tmp==B and C_tmp==C:
        cnt = -1
        break
print(cnt)
a,b,c=map(int,input().split())
cnt=0
if any((a%2==1,b%2==1,c%2==1)):
  print(0)
  exit()
if a==b==c and a%2==0:
  print(-1)
  exit()
while a%2==b%2==c%2==0:
  a,b,c=(b+c)/2,(a+c)/2,(a+b)/2
  cnt+=1
print(cnt)
a,b,c= map(int,input().split())
cnt = 0
if a == b and b == c:
    if a%2 == 0 and b%2 == 0 and c%2 == 0:
        print(-1)
        exit()
    else:
        print(0)
        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)
A,B,C = map(int, input().split())

ans = 0
for ans in range(1000):
    if A&1 or B&1 or C&1:
        print(ans)
        break
    A,B,C = (B+C)//2, (C+A)//2, (A+B)//2
else:
    print(-1)
a ,b ,c = map(int,input().split())
if a == b == c and a % 2 == 0:
    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)
import sys

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

a1 = a
b1 = b
c1 = c
cnt = 0
while (a1%2 ==0) and (b1%2 == 0) and (c1%2 == 0):
    a1,b1,c1 = b1//2 + c1//2, c1//2 + a1//2, a1//2 + b1//2
    cnt += 1
    if (a1 == a) and (b1 == b) and (c1 == c):
        print(-1)
        sys.exit()

print(cnt)
A, B, C = map(int, input().split())
cnt = 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
    cnt += 1
    if cnt >= 10 * 7:
        print(-1)
        break
else:
    print(cnt)
a, b, c = [int(i) for i in input().split()]

cnt = 0
history = set()
while True:
  if (a, b, c) in history:
    print(-1)
    exit(0)
  if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
    print(cnt)
    exit(0)
  a, b, c = sorted([a, b, c])
  history.add((a, b, c))
  na = b // 2 + c // 2
  nb = a // 2 + c // 2
  nc = a // 2 + b // 2
  a = na
  b = nb 
  c = nc
  cnt += 1
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

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

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

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

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

print(ans)
def resolve():
    '''
    code here
    '''
    A, B, C = [int(item) for item in input().split()]
    cnt = 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
        cnt += 1

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

    print(cnt)


if __name__ == "__main__":
    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 and b == c and c == a:
    print(-1)
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())


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)
# -*- coding: utf-8 -*-

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

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

ans = 0
for i in range(10000):
    if (a + 1) * (b + 1) * (c + 1) % 2 == 0:
        print(ans)
        break
    if a == b == c:
        print(-1)
        break
    ans += 1
    a, b, c = a // 2, b // 2, c // 2
    a, b, c = b + c, a + c, b + c
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):
  a = l[0]//2; b = l[1]//2; c = l[2]//2;
  l[0] = b + c
  l[1] = a + c
  l[2] = a + b
  ans += 1
print(ans)
a,b,c = map(int,input().split(' '))
ans = 0
if a % 2 == 0 and a == b and a == c:
    ans = -1
elif (a+1)*(b+1)*(c+1)%2 == 0:
    ans = 0
else:
    A = [a,b,c]
    A.sort()
    a1 = A[2]-A[1]
    a2 = A[1]-A[0]
    ans = 0
    while a1%2 == 0 and a2%2 == 0:
        ans += 1
        a1 /= 2
        a2 /= 2
print(ans)
#!/usr/bin/env python

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

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

ans = 0 
while True:
    if a%2 == 1 or b%2 == 1 or c%2 == 1:
        print(ans)
        exit()
    ta = a 
    tb = b 
    tc = c 
    a = (tb+tc)//2
    b = (tc+ta)//2
    c = (ta+tb)//2
    ans += 1
a,b,c = map(int, input().split())
original = [a,b,c]
flag = 0
i = 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_
    if [a,b,c] == original:
        flag = 1
        break
    i += 1
if flag:
    print(-1)
else:
    print(i)
A,B,C=map(int,input().split())
count=0
if A==B==C and A%2==0:
    print(-1)
    exit()
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
    count+=1
print(count)
import sys
sys.setrecursionlimit(10**9)

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)
	sys.exit()
cnt = 0
while True:
	if a%2==1 or b%2==1 or c%2==1:
		break
	a,b,c = (b+c)//2,(a+c)//2,(b+c)//2
	cnt += 1

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

cnt = 0
while True:
    # print(a, b, c)
    x, y, z = a, b, c

    if x % 2 == 1 or y % 2 == 1 or z % 2 == 1:
        break

    if x == y and y == z and z == x:
        cnt = -1
        break

    x, y, z = a/2, b/2, c/2
    a, b, c = y+z, z+x, x+y
    cnt += 1
print(cnt)
a, b, c = map(int, input().split())
 
if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
    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 = (b+c)//2, (a+c)//2, (a+b)//2
    cnt += 1
 
print(cnt)
a, b, c=map(int, input().split())
if a==b and b==c:
  if a%2==1:
    print(0)
  else:
    print(-1)
else:
  cnt=0
  while(1):
    if a%2==1 or b%2==1 or c%2==1:
      print(cnt)
      break
    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())
ans = 0
for i in range(10000001):
  if a%2 == 1 or b%2 == 1 or c%2 == 1:
    break
  if i == 1000000:
    print(-1)
    exit()
  m = a
  n = b
  l = c
  a = (b+c)//2 
  b = (c+m)//2 
  c = (m+n)//2
  ans += 1
print(ans)
A, B, C = map(int, input().split())
count = 0

while A%2 == 0 and B%2 == 0 and C%2 == 0:
  if A == B and B == C:
    print(-1)
    exit()
  A, B, C = B//2+C//2, A//2+C//2, A//2+B//2
  count += 1
print(count)
a,b,c=map(int,input().split())
 
ans = 0
 
while a%2 == b%2 == c%2 == 0:
  ans += 1
  newa=b//2+c//2
  newb=a//2+c//2
  newc=a//2+b//2
  a=newa
  b=newb
  c=newc
  if a == b == c:
    print("-1")
    break
else:
  print(ans)
import numpy as np
p = np.array(list(map(int, input().split())))

cnt = 0
mem = []
flag = True
while (p % 2).sum() == 0:
    a = p[1] // 2 + p[2] // 2
    b = p[0] // 2 + p[2] // 2
    c = p[1] // 2 + p[0] // 2
    
    p = np.array([a, b, c])
    if (a,b,c) in mem:
        flag = False
        break
    else:
        mem.append((a,b,c))
        
    cnt += 1

print(cnt if flag else -1)
a,b,c=map(int,input().split())
cnt=0
while a%2==b%2==c%2==0:
  a1=a//2
  b1=b//2
  c1=c//2
  a=b1+c1
  b=c1+a1
  c=a1+b1
  cnt+=1
  if a==2*a1 and b==2*b1 and c==2*c1:
    cnt=-1
    break
print(cnt)
a, b, c = map(int, input().split())

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


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

    return cnt


if A % 2 or B % 2 or C % 2:
    print(0)
elif A == B == C:
    print(-1)
else:
    m = min(func(A + B), func(B + C), func(C + A))
    print(m)
import sys
A, B, C = list(map(int, input().split()))
if A % 2 != 0 or B % 2 != 0 or B % 2 != 0:
    print('0')
    sys.exit()
if A == B == C:
    print('-1')
    sys.exit()
cnt = 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
    cnt += 1
print(cnt)
A,B,C = map(int, input().split())
ctr = 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)
    ctr += 1
  print(ctr)
A, B, C = map(int, input().split())

if A == B == C and A%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//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 and a % 2 == 0):
    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 = list(map(int, input().split()))
ans = 0
while A[0] % 2 == 0 and A[1] % 2 == 0 and A[2] % 2 == 0:
    if A[0] == A[1] and A[0] == A[2]:
        ans = -1
        break
    A[0], A[1], A[2] = ( A[1] + A[2] ) / 2, ( A[2] + A[0] ) / 2, ( A[0] + A[1] ) / 2
    ans += 1
print(ans)
a, b, c = map(int, input().split())

total = a + b + c

if a % 2 == 0 and b % 2 == 0 and c % 2 == 0 and a == b == c:
    print(-1)
elif a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
    print(0)
else:
    count = 1
    while True:
        a, b = (total - a) / 2, (total - b) / 2
        if a % 2 != 0 or b % 2 != 0:
            print(count)
            break
        else:
            count += 1
a = list(map(int, input().split()))
A = [a]
ans = 0
while True:
    if (A[-1][0] & 1)or(A[-1][1] & 1)or(A[-1][2] & 1):
        print(ans)
        break
    tmp = [A[-1][1]//2+A[-1][2]//2, A[-1][0]//2 +
           A[-1][2]//2, A[-1][0]//2+A[-1][1]//2]
    if tmp in A:
        print(-1)
        break
    A.append(tmp)
    ans += 1
a,b,c=map(int,input().split())
e=a-b|b-c
print(len(bin(e&-e))-3or-(e==b&1))
A,B,C = list(map(int, input().split()))
count=0
while True:
    if A%2 ==1or B%2 ==1 or C%2 ==1:
        print(count)
        break
    elif  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
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

s = set()

cnt = 0
while A % 2 == B % 2 == C % 2 == 0:
    if (A, B, C) in s:
        cnt = -1
        break
    s.add((A, B, C))
    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())
if any([a%2==1,b%2==1,c%2==1])==True:
    print(0)
else:
    if len(set({a,b,c}))==1:
        print(-1)
    else:
        res=0
        while all([a%2==0,b%2==0,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:
    if a % 2 == 0:
        print(-1)
        exit(0)
    else:
        print(0)
        exit(0)
ans = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    al = b // 2 + c // 2
    bl = a // 2 + c // 2
    cl = a // 2 + b // 2
    a = al
    b = bl
    c = cl
    ans += 1
print(ans)
a,b,c=map(int,input().split())
tmpa=0
ampb=0
tmpc=0

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

for i in range(10**5):
    tmpa=(b+c)/2
    tmpb=(a+c)/2
    tmpc=(b+a)/2
    a=tmpa
    b=tmpb
    c=tmpc
    if a%2==1 or b%2==1 or c%2==1:
        print(i+1)
        exit()
print(-1)
A, B, C = list(map(int, input().split()))
if A == B == C and A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    print(-1)
    exit()
ans = 0
while True:
    if 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
    else:
        break
print(ans)
# agc014_a.py]
A, B, C = map(int,input().split())
cnt = 0
inf = 10**6
for i in range(inf):
    if A%2==0 and B%2==0 and C%2==0: 
        a = (B+C)//2
        b = (A+C)//2
        c = (B+A)//2
        A = a
        B = b
        C = c
        cnt += 1
    else:
        break
if cnt == inf:
    cnt = -1
print(cnt)
A, B, C = list(map(int, input().split()))
[A, B, C].sort() #smaller~bigger
if A==B and B==C:
    if A%2==0:
        print(-1)
    else:
        print(0)
elif (A%2==1) or (B%2==1) or (C%2==1):
    print(0)
else:
    cnt = 0
    while ((A%2==0) and (B%2==0) and (C%2==0)):
        [A, B, C] = [(A+B)/2, (A+C)/2, (B+C)/2]
        cnt += 1
    print(cnt)
l = [list(map(int, input().split()))]
i = 0
while (1):
    a, b, c = map(int,l[i])
    if (a % 2 == 1 or b % 2 == 1 or c % 2 == 1):
        print(i)
        break
    t = [b / 2 + c / 2, c / 2 + a / 2, a / 2 + b / 2]
    if (t in l):
        print(-1)
        break
    l.append(t)
    i+=1
a, b, c = map(int,input().split())

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

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

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

print(times)
def main():
    a, b, c = map(int, input().split())
    if a%2 == 1 or b%2 == 1 or c%2 == 1:
        print("0")
    else:
        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+c)//2, (a+c)//2, (a+b)//2
                ans += 1
            print(ans)

if __name__ == "__main__":
    main()
def mapint_inp():
    return map(int, input().split())

A, B, C = mapint_inp()

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

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

cnt = 0

while True:
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        break
    if a % 2 == 0 and b % 2 == 0 and c % 2 == 0 and a == b and b == c and c == a:
        cnt = -1
        break

    a, b, c = (b + c) / 2, (a + c) / 2, (a + b) / 2
    cnt += 1

print(cnt)
a,b,c=map(int,input().split())
ans=0
average=int((a+b+c)/3)
while True:
    if a%2==1 or b%2==1 or c%2==1:
        print(ans)
        exit()
    else:
        tb=int(b/2)
        tc=int(c/2)
        ta=int(a/2)
        a=tb+tc
        b=ta+tc
        c=ta+tb

        ans+=1
    if a==average and b==average and c==average:
        print(-1)
        exit()
a,b,c=map(int,input().split())
if a == b == c and a%2==0:
    print(-1)
else:
    na,nb,nc = 0,0,0
    cnt = 0
    while a%2==0 and b%2==0 and c%2==0:
        na = (b+c)//2
        nb = (c+a)//2
        nc = (a+b)//2
        cnt += 1
        a,b,c = na,nb,nc
    print(cnt)
a,b,c = map(int,input().split(" "))
n = 0
if a % 2 == 1:
    print(0)
    exit()
if b % 2 == 1:
    print(0)
    exit()
if c % 2 == 1:
    print(0)
    exit()
if a == b == c:
  print(-1)
  exit()
for i in range(10**9):
  aa = a//2
  bb = b//2
  cc = c//2
  a = bb + cc
  b = aa + cc
  c = aa + bb
  n += 1
  if a % 2 == 1:
    break
  if b % 2 == 1:
    break
  if c % 2 == 1:
    break
print(n)
a, b, c = map(int, input().split())
if a == b == c and a%2 == 0:
  print(-1)
elif a%2 or b%2 or c%2:
  print(0)
else:
  ans = 0
  while a%2 == b%2 == c%2 == 0:
    a, b, c = (b+c)//2, (a+c)//2, (a+b)//2
    ans += 1
  print(ans)
a, b, c = list(map(int, input().split(' ')))

if a % 2 == 0 and a == b == c:
    print(-1)
else:
    count = 0
    while True:
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            print(count)
            break
        a, b, c, = (b + c) // 2, (c + a) // 2, (a + b) // 2
        count += 1
# A - Cookie Exchanges
a,b,c = map(int,input().split())

if a==b==c and c%2==0:
    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)
A,B,C = map(int, input().split())
cnt = 0
if A%2 or B%2 or C%2:
    print(cnt)
    exit()
if A == B and B == C:
    print(-1)
    exit()
while True:
    if A%2 or B%2 or C%2:
        print(cnt)
        break
    temp_a = A//2
    temp_b = B//2
    temp_c = C//2
    A += 2*temp_a + temp_b + temp_c
    B += 2*temp_b + temp_a + temp_c
    C += 2*temp_c + temp_a + temp_b
    cnt += 1
a, b, c = map(int, input().split())
count = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    if a == b and b == c and c == a:
        count = -1
        break
    a_tmp = a
    b_tmp = b
    c_tmp = c
    a = (b_tmp + c_tmp) / 2
    b = (c_tmp + a_tmp) / 2
    c = (a_tmp + b_tmp) / 2
    count += 1
print(count)
a,b,c = map(int,input().split())
count = 0
flag = True
while(a % 2 == 0 and b % 2 == 0 and c % 2 == 0):
    aa = a//2
    bb = b//2
    cc = c//2
    a = bb + cc
    b = aa + cc
    c = aa + bb
    if(a == b == c):
        flag = False
        break
    count += 1

if flag:
    print(count)
else:
    print(-1)
a,b,c=map(int,input().split())
cnt=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
    cnt+=1
  print(cnt)
#!/usr/local/bin/python3
# https://atcoder.jp/contests/agc014/tasks/agc014_a

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

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

def check(A, B, C):
    return A%2 == 1 or B%2 == 1 or C%2 == 1

ans = 0
while check(A, B, C) == False:
    nA = (B + C) / 2
    nB = (A + C) / 2
    nC = (A + B) / 2
    A, B, C = nA, nB, nC
    ans += 1

print(ans)
A,B,C = map(int,input().split())
cou = 0
if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):
  print("0")
  exit()
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")
# coding: utf-8

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

    if a == b and b == c and a % 2 == 0:
        ans = -1
    else:
        while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
            d = b / 2 + c / 2
            e = c / 2 + a / 2
            f = a / 2 + b / 2
            a, b, c = d, e, f
            ans += 1

    print(ans)


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

while cnt <= 10**6:
    if (a%2 != 0 or b%2 != 0 or c%2 != 0):
        print(cnt)
        exit()
    
    if a==b==c:
        print(-1)
        exit()
    
    a_ = b//2 + c//2
    b_ = a//2 + c//2
    c_ = a//2 + b//2

    a = a_
    b = b_
    c = c_

    cnt += 1
a, b, c = [int(i) for i in input().split()]
if a == b == c and a % 2 == 0:
    print(-1)
    exit()
if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
    print(0)
    exit()
cnt = 0
while True:
    ta, tb, tc = a, b, c
    ta = (b + c) // 2
    tb = (a + c) // 2
    tc = (a + b) // 2
    cnt += 1
    if ta % 2 == 1 or tb % 2 == 1 or tc % 2 == 1:
        print(cnt)
        break
    a, b, c = ta, tb ,tc
a, b, c = map(int, input().split())
ans = 0

while True:
    if a%2==1 or b%2==1 or c%2==1:
        print(ans)
        break
    if a == b == c:
        print(-1)
        break
    s = a // 2
    t = b // 2
    u = c // 2
    a, b, c = t+u, s+u, s+t
    ans += 1
else:
    print(ans)
a,b,c=map(int,input().split())
e=a-b|c-b
print(len(bin(e&-e))-3or~c%-2)
A,B,C = map(int,input().split())
count = 0

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

else:
  while True:
    if A%2 == 1 or B%2 == 1 or C%2 == 1:
      break
    else:
      A2 = A
      B2 = B
      C2 = C
      A = B2/2 + C2/2
      B = A2/2 + C2/2
      C = A2/2 + B2/2
      count += 1
  print(count)
a, b, c = map(int, input().split())

if a == b and a == c:
	if a % 2 == 1:
		print(0)
		exit()
	else:
		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)
List=list(map(int,input().split()))
cnt=0
while(all(i%2==0 for i in List)):
    if List[0]==List[1]==List[2]:
        print(-1)
        exit()
    old_list=[List[0]//2,List[1]//2,List[2]//2]
    List[0]=old_list[1]+old_list[2]
    List[1]=old_list[0]+old_list[2]
    List[2]=old_list[0]+old_list[1]
    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:
      p=(b+c)//2 ;q=(a+c)//2 ; r=(a+b)//2
      a=p ; b=q;c=r
else:
    print(-1)
A,B,C = map(int, input().split())
result = 0

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

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

for i in range(1,1000000):
    a2=(b//2)+(c//2)
    b2=(a//2)+(c//2)
    c2=(a//2)+(b//2)
    
    a,b,c=a2,b2,c2
    
    if a%2==1 or b%2==1 or c%2==1:
        print(i)
        exit()

print("-1")
A, B, C = map(int, input().split())
ans = 0
while True:
    # print(A, B, C)
    if A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
        if A == B == C:
            print(-1)
            exit()
        ans += 1
        tA = A
        tB = B
        tC = C
        A = tB//2 + tC//2
        B = tA//2 + tC//2
        C = tB//2 + tA//2
    else:
        print(ans)
        exit()