The Hosoya polynomial $H(G,\lambda)$ of a graph $G$ has the property that its first derivative at $\lambda=1$ is equal to the Wiener index. Sometime ago two distance-based graph invariants were studied -- the Schultz index $S$ and its modification $S^\ast$ . We construct distance--based graph polynomials $H_1(G,\lambda)$ and $H_2(G,\lambda)$ , such that their first derivatives at $\lambda=1$ are, respectively, equal to $S$ and $S^\ast$ . In case of trees, $H_1(G,\lambda)$ and $H_2(G,\lambda)$ are related with $H(G,\lambda)$ .