s = gets.to_i
i = 1
list = []
ai = s
loop do
    if list.include?(ai)
        break
    else
        list.push(ai)
    end
    
    if ai.even?
        ai /= 2
    else
        ai = ai*3+1
    end
    i+=1
end

p i