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

ans = 0

while(a%2==0 and b%2==0 and c%2==0):

    if(a==b and b==c and c==a):

        ans = -1

        break

    else:

        a1 = b+c

        b1 = a+c

        c1 = b+a

        a = a1/2

        b = b1/2

        c = c1/2

        ans+=1

    

print(ans)
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)
a, b, c = list(map(int, input().split()))
ans = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    if a == b and b == c and c == a:
        ans = -1
        break
    else:
        a1 = b + c
        b1 = a + c
        c1 = b + a
        a = a1 / 2
        b = b1 / 2
        c = c1 / 2
        ans += 1
print(ans)

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)

-a, b, c = list(map(int, input().split())) +l = list(map(int, input().split())) -while a % 2 == 0 and b % 2 == 0 and c % 2 == 0: -    if a == b and b == c and c == a: +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]: -        a1 = b + c -        b1 = a + c -        c1 = b + a -        a = a1 / 2 -        b = b1 / 2 -        c = c1 / 2 +        a = l[0] +        b = l[1] +        c = l[2] +        l[0] = (b + c) / 2 +        l[1] = (a + c) / 2 +        l[2] = (a + b) / 2