The unsteady motion of an ideal incompressible fluid with a free surface, developing from a state of rest, is considered. The flow is assumed to be irrotational, continuous and two-dimensional; it may be the result either of an initial disturbance of the free boundary or of a given boundary pressure distribution. The rigid boundaries of the flow region are fixed, and the free surface does not cross them at any time during the motion. The fluid is located in a uniform gravity force field and there is no surface tension. A method which in the case of localized roughness of the bottom makes it possible to find the shape of the free surface at any moment of time with predetermined accuracy is proposed. The method involves reducing the initial linear problem to a Volterra integral equation of the second kind, the kernel of this equation being a nonlocal operator. This operator has a smoothing effect, which makes it possible to reduce the solution of the initial problem to the solution of an infinite, perfect lyregular system of Volterra integral equations for a denumerable set of auxiliary functions.