import scala.collection.immutable.IntMap
import scala.io.StdIn._

object Main {
  def main(args: Array[String]) = {
    val map = generatePrimeNumberMap
    for (x <- io.Source.stdin.getLines()) {
      val value = x.toInt
      println(map.get(value).get)
    }
  }

  def generatePrimeNumberMap: scala.collection.mutable.HashMap[Int, Int] = {
    var map = scala.collection.mutable.HashMap[Int, Int]()

    var count = 0
    for (i <- 1 until 100) {
      if (isPrimeNumber(i)) {
        count = count + 1
      }
      map += i -> count
    }

    map
  }

  def isPrimeNumber(value: Int): Boolean = {
    if (value < 2) false
    else if (value == 2) true
    else if (value % 2 == 0) false
    else {
      val sqrt = Math.sqrt(value).toInt
      for (i <- 3 to sqrt by 2) {
        if (value % i == 0) {
          return false
        }
      }

      true
    }
  }
}