let n = stdin.ReadLine() |> int

let counter input =
    let rec inner i count =
        if i > input then count 
        elif input%i = 0 then inner (i+1) (count+1)
        else inner (i+1) count
    inner 1 0

[for i in [1..2..n] do i] |> List.map counter |> List.filter (fun x -> x=8) |> List.length |> printfn "%d"