  We show that the singular set $\Sigma$ in the classical obstacle problem can
be locally covered by a $C^\infty$ hypersurface, up to an "exceptional" set
$E$, which has Hausdorff dimension at most $n-2$ (countable, in the $n=2$
case). Outside this exceptional set, the solution admits a polynomial expansion
of arbitrarily large order. We also prove that $\Sigma\setminus E$ is extremely
unstable with respect to monotone perturbations of the boundary datum. We apply
this result to the planar Hele-Shaw flow, showing that the free boundary can
have singular points for at most countable many times.
