def count(seq):

    seq = sorted(seq)

    arrived = {}

    arrived[seq[0]] = {}

    arrived[seq[0]][seq[1]] = True

    foo = 0

    s = sum(seq)

    while True:

        if (seq[0]&1==1) or (seq[1]&1==1) or (seq[2]&1==1):

            break

        seq = [(s-seq[i])>>1 for i in range(3)]

        seq = sorted(seq)

        if seq[0] in list(arrived.keys()):

            if seq[1] in list(arrived[seq[0]].keys()):

                foo = -1

                break

        else:

            arrived[seq[0]] = {}

        arrived[seq[0]][seq[1]] = True

        foo += 1

    return foo



def main():

    seq = [int(x) for x in input().strip().split()]

    print(count(seq))



if __name__ == '__main__':

    main()

def count(seq):

    seq = sorted(seq)

    if (seq[0] & 1) == 1 or (seq[1] & 1) == 1 or (seq[2] & 1) == 1:

        return 0

    x , y = [seq[1] - seq[0], seq[2] - seq[0]]

    if x == 0 and y == 0:

        return -1

    elif x == 0:

        k = x & -x

    elif y == 0:

        k = y & -y

    else:

        k = min(x & -x, y & -y)

    foo = 0

    while (k & 1) == 0:

        k >>= 1

        foo += 1

    return foo



def main():

    seq = [int(x) for x in input().strip().split()]

    print(count(seq))



if __name__ == '__main__':

    main()

def count(seq):
    seq = sorted(seq)
    arrived = {}
    arrived[seq[0]] = {}
    arrived[seq[0]][seq[1]] = True
    foo = 0
    s = sum(seq)
    while True:
        if (seq[0] & 1 == 1) or (seq[1] & 1 == 1) or (seq[2] & 1 == 1):
            break
        seq = [(s - seq[i]) >> 1 for i in range(3)]
        seq = sorted(seq)
        if seq[0] in list(arrived.keys()):
            if seq[1] in list(arrived[seq[0]].keys()):
                foo = -1
                break
        else:
            arrived[seq[0]] = {}
        arrived[seq[0]][seq[1]] = True
        foo += 1
    return foo


def main():
    seq = [int(x) for x in input().strip().split()]
    print(count(seq))


if __name__ == "__main__":
    main()

def count(seq):
    seq = sorted(seq)
    if (seq[0] & 1) == 1 or (seq[1] & 1) == 1 or (seq[2] & 1) == 1:
        return 0
    x, y = [seq[1] - seq[0], seq[2] - seq[0]]
    if x == 0 and y == 0:
        return -1
    elif x == 0:
        k = x & -x
    elif y == 0:
        k = y & -y
    else:
        k = min(x & -x, y & -y)
    foo = 0
    while (k & 1) == 0:
        k >>= 1
        foo += 1
    return foo


def main():
    seq = [int(x) for x in input().strip().split()]
    print(count(seq))


if __name__ == "__main__":
    main()

-    arrived = {} -    arrived[seq[0]] = {} -    arrived[seq[0]][seq[1]] = True +    if (seq[0] & 1) == 1 or (seq[1] & 1) == 1 or (seq[2] & 1) == 1: +        return 0 +    x, y = [seq[1] - seq[0], seq[2] - seq[0]] +    if x == 0 and y == 0: +        return -1 +    elif x == 0: +        k = x & -x +    elif y == 0: +        k = y & -y +    else: +        k = min(x & -x, y & -y) -    s = sum(seq) -    while True: -        if (seq[0] & 1 == 1) or (seq[1] & 1 == 1) or (seq[2] & 1 == 1): -            break -        seq = [(s - seq[i]) >> 1 for i in range(3)] -        seq = sorted(seq) -        if seq[0] in list(arrived.keys()): -            if seq[1] in list(arrived[seq[0]].keys()): -                foo = -1 -                break -        else: -            arrived[seq[0]] = {} -        arrived[seq[0]][seq[1]] = True +    while (k & 1) == 0: +        k >>= 1