3. Given $x_{1}, x_{2}, \cdots, x_{100}$ are non-negative real numbers, and for $i=1,2, \cdots, 100$, we have $x_{i}+x_{i+1}+x_{i+2} \leqslant 1$, where $x_{101}=x_{1}, x_{102}=x_{2}$. Find the maximum value of the sum $S=\sum_{i=1}^{100} x_{i} x_{i+2}$.
3. The maximum value of $S$ is $\frac{25}{2}$.

For $i=1,2, \cdots, 50$, set $x_{2 i}=0, x_{2 i-1}=\frac{1}{2}$. Then $S=50 \times\left(\frac{1}{2}\right)^{2}=\frac{25}{2}$.

Below is the proof: For all $x_{1}, x_{2}, \cdots, x_{100}$ that satisfy the conditions, we have
$$
S \leqslant \frac{25}{2} \text {. }
$$

Since for all $i(1 \leqslant i \leqslant 50)$,
$$
\begin{array}{l}
x_{2 i-1} \leqslant 1-x_{2 i}-x_{2 i+1}, \\
x_{2 i+2} \leqslant 1-x_{2 i}-x_{2 i+1},
\end{array}
$$

By the AM-GM inequality, we get
$$
\begin{array}{l}
x_{2 i-1} x_{2 i+1}+x_{2 i} x_{2 i+2} \\
\leqslant\left(1-x_{2 i}-x_{2 i+1}\right) x_{2 i+1}+x_{2 i}\left(1-x_{2 i}-x_{2 i+1}\right) \\
=\left(x_{2 i}+x_{2 i+1}\right)\left(1-x_{2 i}-x_{2 i+1}\right) \\
\leqslant\left[\frac{\left(x_{2 i}+x_{2 i+1}\right)+\left(1-x_{2 i}-x_{2 i+1}\right)}{2}\right]^{2} \\
=\frac{1}{4} .
\end{array}
$$

Thus, $S=\sum_{i=1}^{50}\left(x_{2 i-1} x_{2 i+1}+x_{2 i} x_{2 i+2}\right)$
$$
\leqslant 50 \times \frac{1}{4}=\frac{25}{2} \text {. }
$$