let () = Scanf.scanf "%d %d" @@ fun a b ->
  Printf.printf "%d\n" @@ List.length @@
    List.filter (fun s ->
      s = String.init (String.length s) (fun i -> s.[String.length s - 1 - i])) @@ Array.to_list @@ Array.init (b - a + 1) @@ fun i -> string_of_int @@ i + a