fun main(args:Array<String>):Unit {
  val sc = java.util.Scanner(System.`in`)
  val n = sc.nextInt()
  println((1..n).filter { it % 2 == 1 }.filter { v ->
    (1..v).asSequence().filter { v % it == 0 }.count() == 8
  }.count())
}