A direct inversion scheme for computing the velocity profile from reflected data