17. Let the complex number $z$ vary under the condition $|z|=1$, find the maximum and minimum values of $\left|z^{3}-3 z-2\right|$.

Let the complex number $z$ vary under the condition $|z|=1$, find the maximum and minimum values of $\left|z^{3}-3 z-2\right|$.