The dynamics of surface waves with a small but finite amplitude is theoretically investigated. The equations for continuity and motion are reduced to two equations for a three-dimensional perturbation of a free surface and of the horizontal component of the fluid velocity vector averaged over the water depth. The system forms a mathematical base of the differential model for ocean waves of arbitrary shape, at a smooth topography of the ocean floor. The wave type equation is derived for the horizontal bottom and quasi-steady perturbations in a coordinate system moving with the wave velocity. The equations obtained have solutions in a form of traveling waves of the Stokes type. Solitary solutions are found for moderately long perturbations.