2. Let the complex number $z=\cos \theta+i \sin \theta\left(0^{\circ} \leqslant \theta \leqslant\right.$ $\left.180^{\circ}\right)$, and the complex numbers $z, (1+i)z, 2\bar{z}$ correspond to three points $P, Q, R$ in the complex plane. When $P, Q, R$ are not collinear, the fourth vertex of the parallelogram formed by segments $PQ, PR$ is $S$. Then the maximum distance from point $S$ to the origin is $\qquad$.
2.3.

Let the complex number $w$ correspond to point $S$. Since $Q P R S$ is a parallelogram, we have
$$
w+z=2 \bar{z}+(1+i) z \text{, i.e., } w=2 \bar{z}+i z \text{. }
$$

Therefore, $|w|^{2}=(2 \bar{z}+i z)(2 z-i \bar{z})$
$$
\begin{array}{l}
=4+1+2 i\left(z^{2}-\bar{z}^{2}\right) \\
=5-4 \sin 2 A<5 \div 4=9 .
\end{array}
$$
(When $\theta=135^{\circ}$, equality holds.)
Hence, $|w|_{\operatorname{max}}=3$.