x = int(input())
ans = 0
while x != 1:
    if x % 2 == 1:
        x = x * 3 + 1
    else:
        x //= 2
    ans += 1
print(ans)