a, b, c = list(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()

    

    a_ = b//2 + c//2

    b_ = a//2 + c//2

    c_ = a//2 + b//2



    a = a_

    b = b_

    c = c_



    cnt += 1

print((-1))
a, b, c = list(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 = list(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()
    a_ = b // 2 + c // 2
    b_ = a // 2 + c // 2
    c_ = a // 2 + b // 2
    a = a_
    b = b_
    c = c_
    cnt += 1
print((-1))

a, b, c = list(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

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