fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val answer = (105..n).count { pred(it) }
    println(answer)
}

fun divisors(n: Int) =
        (1..n).toList().filter { n % it == 0 }

fun pred(n: Int) =
        n % 2 == 1 && divisors(n).size == 8