nums = []

nums.append(int(eval(input())))



for i in range(1,100000):

    if nums[i - 1] % 2 == 0:

        nums.append(nums[i - 1] // 2)

    else:

        nums.append(nums[i - 1] * 3 + 1)



for i in range(100000):

    for j in range(i + 1,100000):

        if nums[i] == nums[j]:

            print((j + 1))

            break

    else:

        continue

    break
def f(n):

    return n // 2 if n % 2 == 0 else n * 3 + 1

    

s = int(eval(input()))



count = 1

while True:

    if s == 1 or s == 2 or s == 4:

        print((count + 3))

        break

    else:

        s = f(s)

    count += 1

nums = []
nums.append(int(eval(input())))
for i in range(1, 100000):
    if nums[i - 1] % 2 == 0:
        nums.append(nums[i - 1] // 2)
    else:
        nums.append(nums[i - 1] * 3 + 1)
for i in range(100000):
    for j in range(i + 1, 100000):
        if nums[i] == nums[j]:
            print((j + 1))
            break
    else:
        continue
    break

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


s = int(eval(input()))
count = 1
while True:
    if s == 1 or s == 2 or s == 4:
        print((count + 3))
        break
    else:
        s = f(s)
    count += 1

-nums = [] -nums.append(int(eval(input()))) -for i in range(1, 100000): -    if nums[i - 1] % 2 == 0: -        nums.append(nums[i - 1] // 2) +def f(n): +    return n // 2 if n % 2 == 0 else n * 3 + 1 + + +s = int(eval(input())) +count = 1 +while True: +    if s == 1 or s == 2 or s == 4: +        print((count + 3)) +        break -        nums.append(nums[i - 1] * 3 + 1) -for i in range(100000): -    for j in range(i + 1, 100000): -        if nums[i] == nums[j]: -            print((j + 1)) -            break -    else: -        continue -    break +        s = f(s) +    count += 1