open System


[<EntryPoint>]
let main argv =
    let N =stdin.ReadLine()|>int
    let rec div n i = if i=0 then 0 else ((div n (i-1))+(if (n%i)=0 then 1 else 0))
    [for i in [1..N] do yield (if (div i i = 8)&&((i%2)<>0) then 1 else 0)]
    |>List.sum
    |>stdout.WriteLine
    0