fun pfactorize(n: Int): List<Pair<Int, Int>> {
    if (n == 0) return emptyList()
    if (n == 1 || n == 2 || n == 3) return listOf(n to 1)
    var m = n
    val primes = mutableListOf<Pair<Int, Int>>()
    for (i in 2..Math.sqrt(n.toDouble()).toInt()) {
        var exp = 0
        while (m % i == 0) {
            m /= i
            exp++
        }
        if (exp != 0) primes += i to exp
    }
    return primes
}

fun countDivisor(n: Int): Int {
    val pf = pfactorize(n)
    return pf.map(Pair<Int, Int>::second).fold(1) { acc, exp -> acc * (exp + 1) }
}

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val ans = (1..n step 2).count { countDivisor(it) == 8 }
    println(ans)
}
