s = gets.chomp.to_i
a = [s]
1000.times do |i|
  if s % 2 == 0
    s /= 2
    a.each do |j|
      if j == s
        puts i + 2
        exit
      end
    end
  else
    s = 3 * s + 1
    a.each do |j|
      if j == s
        puts i + 2
        exit
      end
    end
  end
  a << s
end
