Three. (20 points) Given $0 \leqslant x, y, z \leqslant 1$, and $|x-y|$, $|y-z|$, $|z-x|$ are all no greater than $\frac{1}{2}$. Try to find the maximum and minimum values of $S=x+y+z - xy - yz - zx$.

---

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly. 

---

Three. (20 points) Given $0 \leqslant x, y, z \leqslant 1$, and $|x-y|$, $|y-z|$, $|z-x|$ are all no greater than $\frac{1}{2}$. Try to find the maximum and minimum values of $S=x+y+z - xy - yz - zx$.
$$
\text { Three, } S_{\text {min }}=0, S_{\text {max }}=\frac{5}{6} \text {. }
$$

From the problem, we know that $x+y+z \geqslant x y+y z+z x$. That is, $S \geqslant 0$.
When $x=y=z=0$ or 1, $S$ reaches its minimum value 0.
$$
\begin{array}{l}
\text { Also, } S=x+y+z-x y-y z-z x \\
=x(1-y)+y(1-z)+z(1-x),
\end{array}
$$

Without loss of generality, assume that two of $x, y, z$ (let's say $y, z$) are not less than $\frac{1}{2}$, otherwise, replace $1-x, 1-y, 1-z$ with $x, y, z$, and the conclusion still holds. Let $y \geqslant z \geqslant \frac{1}{2}$, then $x \geqslant y-\frac{1}{2}$. By $y+z \geqslant 1$, we know
$$
\begin{array}{l}
S=x(1-y-z)+y+z-y z \\
\leqslant\left(y-\frac{1}{2}\right)(1-y-z)+y+z-y z \\
=-y^{2}+\frac{5}{2} y-\frac{1}{2}+\left(\frac{3}{2}-2 y\right) z .
\end{array}
$$

When $y \geqslant \frac{3}{4}$, by $\frac{3}{2}-2 y \leqslant 0$, we know
$$
\begin{array}{l}
S \leqslant-y^{2}+\frac{5}{2} y-\frac{1}{2}+\frac{1}{2}\left(\frac{3}{2}-2 y\right) \\
=-\left(y-\frac{3}{4}\right)^{2}+\frac{13}{16} \leqslant \frac{13}{16}<\frac{5}{6} . \\
\text { When } \frac{1}{2} \leqslant y \leqslant \frac{3}{4} \text {, by } \frac{3}{2}-2 y \geqslant 0, \text { we know } \\
S \leqslant-y^{2}+\frac{5}{2} y-\frac{1}{2}+y\left(\frac{3}{2}-2 y\right) \\
=-3\left(y-\frac{2}{3}\right)^{2}+\frac{5}{6} \leqslant \frac{5}{6} .
\end{array}
$$

When $\frac{1}{2} \leqslant y \leqslant \frac{3}{4}$, by $\frac{3}{2}-2 y \geqslant 0$, we know

When and only when $y=z=\frac{2}{3}, x=\frac{1}{6}$, $S$ reaches its maximum value $\frac{5}{6}$.