Inverse scattering problem for the wave equation in a one-dimensional inhomogeneous medium