fun main(args: Array<String>) = p2_abc106b()

fun p2_abc106b() {
    val n = readLine()!!.toInt()

    var answer = 0

    for (i in 1..n) {
        if (i % 2 == 0) continue

        val divCount = (1..n).count { i % it == 0 }
        if (divCount == 8) answer++
    }

    println(answer)
}

