object Main {
  def main(args: Array[String]): Unit = {
    val input = new java.util.Scanner(System.in)

    while(input.hasNext) {
      val n = input.nextInt
      var remained = (2 to n).filter(_ % 2 != 0).toList
      var hoge = List(2)

      while (remained.length > 0) {
        val headPrime = remained.head
        hoge = hoge :+ headPrime
        remained = remained.toList.filter(_ % headPrime != 0)
      }
      //println(hoge.mkString(" "))
      println(hoge.length)
    }
  }
}