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 = [ 1 .. 2 .. n ].Count(fun k -> n % k = 0)

let N = int (input())


[ 1 .. 2 .. N ].Count(fun k -> f k = 8) |> print
