s = gets.chomp.to_i
array = []
array << s

f = 1
count = 1
while f == 1 do
    count += 1
    if array[-1].even? then
        array << array[-1] / 2
    else
        array << 3*array[-1] + 1
    end
    if array.count != array.uniq.count then
        f = 0
    end
end

print count