let n = read_int ()
let f n = let rec f i = if i > n then 0 else f (i + 1) + if n mod i = 0 then 1 else 0 in f 1
let ans = ref 0
let _ = for i = 1 to n do if i mod 2 = 1 && f i = 8 then incr ans done; Printf.printf "%d\n" !ans