let num_divs x =
  let rec f c i =
    if i > x then c
    else if x mod i = 0 then f (c+1) (i+1)
    else f c (i+1)
  in f 0 1
let () = Scanf.scanf "%d" @@ fun n ->
  Array.init n (fun i -> if (i+1) mod 2 = 1 && num_divs (i+1) = 8 then 1 else 0)
  |> Array.fold_left (+) 0
  |> Printf.printf "%d\n"