  Using 580 pb$^{-1}$ of $e^+e^-$ annihilation data taken with the CLEO--c
detector at $\psi(3770)$, the decay $D^0(\overline{D}^0)\to K^\pm\pi^\mp
\pi^+\pi^-$ has been studied to make the highest precision measurement of $D^0$
mass, $M(D^0)=1864.845\pm0.025\pm0.022\pm0.053$ MeV, where the first error is
statistical, the second error is systematic, and the third error is due to
uncertainty in kaon masses. As an intermediate step of the present
investigation the mass of the $K_S$ meson has been measured to be
$M(K_S)=497.607\pm0.007\pm0.015$ MeV. Both $M(D^0)$ and $M(K_S)$ are the most
precise single measurements of the masses of these mesons.
