s = int(eval(input()))



def f(x):

    if x%2==0: return x//2

    else: return 3*x+1



a = []

for i in range(1000000):

    if s in a:

        print((i+1))

        break

    else:

        a.append(s)

        s = f(s)

s = int(eval(input()))



def f(x):

    if x%2==0:return x//2

    else:return x*3+1



a = []

i = 1

while True:

    if s in a:

        print(i)

        exit()

    else:

        a.append(s)

        s = f(s)

        i+=1
s = int(eval(input()))


def f(x):
    if x % 2 == 0:
        return x // 2
    else:
        return 3 * x + 1


a = []
for i in range(1000000):
    if s in a:
        print((i + 1))
        break
    else:
        a.append(s)
        s = f(s)

s = int(eval(input()))


def f(x):
    if x % 2 == 0:
        return x // 2
    else:
        return x * 3 + 1


a = []
i = 1
while True:
    if s in a:
        print(i)
        exit()
    else:
        a.append(s)
        s = f(s)
        i += 1

-        return 3 * x + 1 +        return x * 3 + 1 -for i in range(1000000): +i = 1 +while True: -        print((i + 1)) -        break +        print(i) +        exit() +        i += 1