# agc014_a.py]

A, B, C = list(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)
# agc014_a.py]

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

cnt = 0

inf = 10**2

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)
# agc014_a.py]
A, B, C = list(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)

# agc014_a.py]
A, B, C = list(map(int, input().split()))
cnt = 0
inf = 10**2
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)

-inf = 10**6 +inf = 10**2