open Batteries

let () =
  let solve a b x = Enum.filter (fun i -> i mod x = 0) (a---b) |> Enum.count in
  let f = function
    | [a;b;c] -> solve a b c |> Printf.printf "%d\n"
    | _ -> print_endline "unexpected" in
  read_line ()
  |> String.nsplit ~by:" "
  |> List.map int_of_string
  |> f
