import io.StdIn.{readInt, readLine}

object Main extends App {

  val n = readInt
  val numbers = (1 to n by 2)

  def divisor_count(i: Int): Int =
    (1 to i).count(i%_==0)

  val result = numbers.count(divisor_count(_) == 8)
  println(result)

}