object Main {
  import io.StdIn._

  def getStrings = readLine().split(" ")
  def getInts = getStrings.map(_.toInt)

  def main(args: Array[String]): Unit = {
    val N = getInts(0)
    val primes = Array(3, 5, 7, 9, 11, 13, 17, 19, 23, 29, 31, 37)
    val three = for(p1 <- primes; p2 <- primes if p2 != p1; p3 <- primes if p3 != p2 && p3 != p1) yield p1 * p2 * p3
    val two = for(p1 <- primes; p2 <- primes if p2 != p1) yield p1 * p1 * p1 * p2
    println((three ++ two).toSet.count(_ <= N))
  }
}
