fun main(args: Array<String>) {
    val n = readInteger()
    (1..n step 2).filter {
        (1..it).filter { n -> it % n == 0 }.count() == 8
    }.count().let(::println)
}

fun readInteger() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntegerList() = readStringList().map(String::toInt)
fun readLongList() = readStringList().map(String::toLong)
