(* range l r == [l; l+1; ...; r] *)
let range l r =
  let rec go acc l r =
    if l > r then acc else go (l :: acc) (l + 1) r
  in go [] l r

let solve l r d =
  List.length @@ List.filter (fun n -> n mod d == 0) @@ range l r

let () =
  Scanf.scanf "%d %d %d" @@ fun l r d ->
  print_int @@ solve l r d;
  print_newline ()
