let n = int (stdin.ReadLine())
let mutable count = 0
let mutable num = 0
for i in 1..2..n do
    for j in 1..i do
        if i % j = 0 then num <- num + 1
    if num = 8 then count <- count + 1
    num <- 0
printfn "%d" count 