Canonical system of equations for 1D water waves