open System.Linq
open System.Text.RegularExpressions

let input() = stdin.ReadLine()
let inputs() = input().Split()

let YN b = printfn "%s" (if b then "Yes" else "No")
let print x = printfn "%A" x
let printS (s: string) = printfn "%s" s

let f n =
    query {
        for k in [ 1 .. n .. 2 ] do
            where (n % k = 0)
    }
    |> Seq.length

let N = int (input())

seq {
    for k in [ 1 .. N .. 2 ] do
        if f k = 8 then yield 1
}
|> Seq.length
|> print
