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



if any(i % 2 != 0 for i in [a, b, c]):

    print((0))

    exit()



if a == b and b == c:

    print((-1))

    exit()



cnt = 0

a_list = [0]*(1001001)

b_list = [0]*(1001001)

c_list = [0]*(1001001)

a_list[0] = a

b_list[0] = b

c_list[0] = c



for i in range(1, 1001001):

    a_list[i] = (b_list[i-1] + c_list[i-1]) // 2

    b_list[i] = (c_list[i-1] + a_list[i-1]) // 2

    c_list[i] = (a_list[i-1] + b_list[i-1]) // 2

    cnt += 1

    if a_list[i] % 2 != 0 or b_list[i] % 2 != 0 or c_list[i] % 2 != 0:

        break



print(cnt)

def solve(a, b, c):

    if any(i % 2 == 1 for i in [a, b, c]):

        return 0

    if a == b == c:

        return -1

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

    return solve(a, b, c) + 1



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



print((solve(a, b, c)))
a, b, c = list(map(int, input().split()))
if any(i % 2 != 0 for i in [a, b, c]):
    print((0))
    exit()
if a == b and b == c:
    print((-1))
    exit()
cnt = 0
a_list = [0] * (1001001)
b_list = [0] * (1001001)
c_list = [0] * (1001001)
a_list[0] = a
b_list[0] = b
c_list[0] = c
for i in range(1, 1001001):
    a_list[i] = (b_list[i - 1] + c_list[i - 1]) // 2
    b_list[i] = (c_list[i - 1] + a_list[i - 1]) // 2
    c_list[i] = (a_list[i - 1] + b_list[i - 1]) // 2
    cnt += 1
    if a_list[i] % 2 != 0 or b_list[i] % 2 != 0 or c_list[i] % 2 != 0:
        break
print(cnt)

def solve(a, b, c):
    if any(i % 2 == 1 for i in [a, b, c]):
        return 0
    if a == b == c:
        return -1
    a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2
    return solve(a, b, c) + 1


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

+def solve(a, b, c): +    if any(i % 2 == 1 for i in [a, b, c]): +        return 0 +    if a == b == c: +        return -1 +    a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2 +    return solve(a, b, c) + 1 + + -if any(i % 2 != 0 for i in [a, b, c]): -    print((0)) -    exit() -if a == b and b == c: -    print((-1)) -    exit() -cnt = 0 -a_list = [0] * (1001001) -b_list = [0] * (1001001) -c_list = [0] * (1001001) -a_list[0] = a -b_list[0] = b -c_list[0] = c -for i in range(1, 1001001): -    a_list[i] = (b_list[i - 1] + c_list[i - 1]) // 2 -    b_list[i] = (c_list[i - 1] + a_list[i - 1]) // 2 -    c_list[i] = (a_list[i - 1] + b_list[i - 1]) // 2 -    cnt += 1 -    if a_list[i] % 2 != 0 or b_list[i] % 2 != 0 or c_list[i] % 2 != 0: -        break -print(cnt) +print((solve(a, b, c)))