import java.util.*

val sc = Scanner(System.`in`)
val N = sc.nextInt()

fun main(args: Array<String>) {
    (1..N).filter { judge(it) && it % 2 != 0 }.count().let(::println)
}

fun judge(n: Int): Boolean {
    return (1..n).filter { n % it == 0 }.count() == 8
}
