s = gets.to_i
a = []
a << s
i = 2
while true
    x = a.last.even? ? a.last/2 : 3*a.last + 1
    for j in a
        if x == j
            puts i
            exit
        end
    end
    a << x
    i += 1
end
