s=gets.chomp.to_i
ary = []
i = 0
loop do
  i += 1
  if s % 2 == 0
    tmp = s / 2
    if ary.include?(tmp)
      break
    end
    ary << tmp
    s = tmp
  else
    tmp = 3*s + 1
    if ary.include?(tmp)
      break
    end
    ary << tmp
    s = tmp
  end
end

puts i + 1