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

puts i