import sys





def solve():

    readline = sys.stdin.buffer.readline

    mod = 10 ** 9 + 7

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

    if a == b == c:

        if a == b == c == 1:

            print((0))

        else:

            print((-1))

    else:

        cnt = 0

        while True:

            if a % 2 == b % 2 == c % 2 == 0:

                cnt += 1

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

            else:

                print(cnt)

                exit()





if __name__ == '__main__':

    solve()

import sys





def solve():

    input = sys.stdin.readline

    mod = 10 ** 9 + 7

    a, b, c = list(map(int, input().rstrip('\n').split()))

    if a == b == c:

        if a == b == c == 1:

            print((0))

        else:

            print((-1))

    else:

        if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:

            cnt = 0

            while True:

                if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:

                    cnt += 1

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

                else:

                    break

            print(cnt)

        else:

            print((0))





if __name__ == '__main__':

    solve()

import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10**9 + 7
    a, b, c = list(map(int, readline().split()))
    if a == b == c:
        if a == b == c == 1:
            print((0))
        else:
            print((-1))
    else:
        cnt = 0
        while True:
            if a % 2 == b % 2 == c % 2 == 0:
                cnt += 1
                a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2
            else:
                print(cnt)
                exit()


if __name__ == "__main__":
    solve()

import sys


def solve():
    input = sys.stdin.readline
    mod = 10**9 + 7
    a, b, c = list(map(int, input().rstrip("\n").split()))
    if a == b == c:
        if a == b == c == 1:
            print((0))
        else:
            print((-1))
    else:
        if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
            cnt = 0
            while True:
                if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
                    cnt += 1
                    a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2
                else:
                    break
            print(cnt)
        else:
            print((0))


if __name__ == "__main__":
    solve()

-    readline = sys.stdin.buffer.readline +    input = sys.stdin.readline -    a, b, c = list(map(int, readline().split())) +    a, b, c = list(map(int, input().rstrip("\n").split())) -        cnt = 0 -        while True: -            if a % 2 == b % 2 == c % 2 == 0: -                cnt += 1 -                a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2 -            else: -                print(cnt) -                exit() +        if a % 2 == 0 and b % 2 == 0 and c % 2 == 0: +            cnt = 0 +            while True: +                if a % 2 == 0 and b % 2 == 0 and c % 2 == 0: +                    cnt += 1 +                    a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2 +                else: +                    break +            print(cnt) +        else: +            print((0))