
fun main(args:Array<String>) {
    println((1..readLine()!!.toInt()).filter { it % 2 != 0 && is105(it) }.size)
}

fun is105(num:Int):Boolean {
    return (1..num).filter { num % it == 0 }.size == 8
}