def bb
    n = gets.chomp.to_i

    i = 1
    o = [n]
    for i in 1..1000000
        no = o[i-1]%2 == 0 ? o[i-1]/2 : 3*o[i-1]+1
        break if o.index(no)
        o.push(no)
    end

    puts i+1
end

bb
