let n, ans = read_int (), ref 0
let _ = for i = 1 to n do if i mod 2 = 1 then let c = ref 0 in for j = 1 to i do if i mod j = 0 then incr c done; if !c = 8 then incr ans done; Printf.printf "%d\n" !ans