The inversion of acoustical impedance profile by methods of characteristics