The paper aims to generalize the classical derivation of the Korteweg-de Vries equation for small-amplitude long waves on the surface of a shallow layer of water (in the absence of viscosity and for irrotational flows), taking into regard the surface tension and possible non-uniformity of the bottom. The analysis gives rise to a coupled system of two equations for the velocity at the surface, , and local elevation of the surface, :
where is the local depth, and small parameter is the measure for the smallness of ratio of the local elevation of the free surface to the depth of the layer. It is proven that the full dynamics of the water waves is described by the above system for a long time interval. In fact, a priori estimates for the duration of the validity interval are essentially the same as obtained in earlier works, but estimates for the solution, and especially for its derivatives, are much stronger. The analysis is performed in the Eulerian (rather than Lagrangian) coordinates.