local a = {}
a[1] = io.read("*n")

local function f(n)
    local x
    if n%2==0 then
        return n/2
    else
        return 3*n+1
    end
end

for i = 2, 1000000 do
   a[i] = f(a[i-1])
end

for i = 1, 1000000 do
    if a[i]==1 or a[i]==2 or a[i]==4 then
        print(i+3)
        break
    end
end