import scala.math.sqrt

object Main extends App {
  val src = io.Source.stdin.getLines.map(_.toInt)

  def isPrime(n: Int): Boolean = n>1 && (2 to (sqrt(n).toInt)).forall(n%_ != 0)

  for (i <- src) println(List.range(1, i+1).filter(isPrime(_)).length)
}



