import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = println(solve(new Scanner(System.in)))

  def solve(in: String): String = solve(new Scanner(in))

  def solve(sc: Scanner): String = {
//    for (i <- 1 to 200 by 2) {
//      var cnt = 0
//      for (j <- 1 to i by 2) {
//        if (i % j == 0) cnt += 1
//      }
//      if (cnt == 8) println(i)
//    }

    val N = sc.nextInt
    val ans = Array(105, 135, 165, 189, 195)
    ans.count(_ <= N).toString
  }
}
