import scala.io.StdIn

object Main extends App {

  def divisor(k: Int): Int = (1 to k).count(p => (k % p) == 0)
  
  val n = StdIn.readLine().toInt

  val r = (105 to n).filter(p => p % 2 == 1).count(f => divisor(f) == 8)

  println(r)
}
