Scanf.scanf "%d" (fun n ->
    let check i =
        let rec loop j acc =
            if j > i then acc = 8 else
                if i mod j = 0 then loop (j + 1) (acc + 1)
                               else loop (j + 1) acc
        in
        loop 1 0
    in
    let rec loop i acc =
        if i > n then acc else
            let acc = if check i then acc + 1 else acc in
            loop (i + 2) acc
    in
    loop 1 0 |> Printf.printf "%d\n"
)