import kotlin.math.sqrt

fun main() {
    val nmk = nextInt()
    val ans = solve(nmk)
    println(ans)
}

fun solve(nmk: Int): Int {
    val a = (1..nmk).filter { it % 2 != 0 }.filter {
        (1..nmk).filter { i -> it % i == 0 }.size == 8
    }

    return a.size

}

fun nextInt(): Int {
    return readLine()!!.toInt()
}