object Main {
	def sieve(xs: List[Int]): List[Int] =
			if (xs.isEmpty) Nil
			else xs.head :: sieve(xs.tail.filter(_ % xs.head != 0))
  
    def main(args:Array[String]) = {
        val sc = new java.util.Scanner(System.in)
        while(sc.hasNext){
	        val n = sc.nextInt
	        val list =sieve(Range(2,n+1).toList)

	        println(list.size)
    	}
    }
}