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

d=0

while d<10**5:

    if a%2==1 or b%2==1 or c%2==1:break

    a,b,c=b/2+c/2,a/2+c/2,a/2+b/2

    d+=1

else:d=-1

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

ans=0

while a%2==0 and b%2==0 and c%2==0 and ans<10000:

    a,b,c=b//2+c//2,a//2+c//2,a//2+b//2

    ans+=1

if ans==10000:ans=-1

print(ans)
a, b, c = list(map(int, input().split()))
d = 0
while d < 10**5:
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        break
    a, b, c = b / 2 + c / 2, a / 2 + c / 2, a / 2 + b / 2
    d += 1
else:
    d = -1
print(d)

a, b, c = list(map(int, input().split()))
ans = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0 and ans < 10000:
    a, b, c = b // 2 + c // 2, a // 2 + c // 2, a // 2 + b // 2
    ans += 1
if ans == 10000:
    ans = -1
print(ans)

-d = 0 -while d < 10**5: -    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1: -        break -    a, b, c = b / 2 + c / 2, a / 2 + c / 2, a / 2 + b / 2 -    d += 1 -else: -    d = -1 -print(d) +ans = 0 +while a % 2 == 0 and b % 2 == 0 and c % 2 == 0 and ans < 10000: +    a, b, c = b // 2 + c // 2, a // 2 + c // 2, a // 2 + b // 2 +    ans += 1 +if ans == 10000: +    ans = -1 +print(ans)