import scala.io.StdIn._
import scala.math._

/**
 * ABC106B
 */
object Main extends App {

  val n = readInt

  def fcnt(num: Int) = {
    (1 to num).filter(_ % 2 == 1).count(v => num % v == 0)
  }

  val ans = (2 to n).count(fcnt(_) == 8)

  println(ans)
}
