Traveltime inversion for the flat‐layer model