// B - 105
// https://abc106.contest.atcoder.jp/tasks/abc106_b

import scala.io.StdIn.readLine

object Main extends App {

  val n = readLine.toInt

  def countDivisors(num: Int): Int = {
    (1 to num).filter(num % _ == 0).length
  }

  val count = (1 to n).filter(_ % 2 == 1).filter(countDivisors(_) == 8).length

  println(count)

}