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

a = []
a[0] = 0
a[1] = gets.chomp!.to_i
i = 1
while 1 do
    #puts f(a[i])
    i+=1
    a << f( a [i-1] )
    if a.count( a [i] ) == 2 then
        puts a.length-1
        break
    end
end