fun main(args: Array<String>) {
    val N = readLine()!!.toInt()

    var sumAll = 0
    for (i in 9..N step 2) {
        var sum = 0
        for (j in 1..N) {
            if(i % j == 0){
                sum++
            }
        }

        if(sum == 8){
           sumAll++
        }
    }
    println(sumAll)
}