
object Main extends App {

  val n = scala.io.StdIn.readInt()

  def solve(): Int = {
    var ans = 0
    for(i <- 1 to n by 2) {
      var numOfDividers = 0
      for(j <- 1 to i) {
        if(i % j == 0) numOfDividers += 1
      }
      if(numOfDividers == 8) ans += 1
    }
    ans
  }


  println(solve)

}
