import scala.math._
import scala.io.Source.stdin

object Main {
  def eratosthenes(n: Int): Set[Int] = {
    def loop(l: Set[Int], primeNumList: Set[Int] = Set()): Set[Int] = {
      if (l.min <= sqrt(n)) {
        val primeNum = l.min
        loop(l.filterNot(_ % primeNum == 0), primeNumList + primeNum)
      } else l ++: primeNumList
    }

    loop((2 to n).toSet)
  }

  def main(args: Array[String]): Unit = {
    val input = stdin.getLines.map(_.toInt).toList
    val primeNumListMax = eratosthenes(10)
    input.foreach(i => println(primeNumListMax.count(_ <= i)))
  }
}