num = input()
num = int(num)
i = 0;
while num != 1:
    i += 1
    if num % 2 == 1:
        num = (num * 3 + 1) / 2
    else:
        num = num / 2
print(i)