4. Given $x_{1}, x_{2}, \cdots, x_{15}$ take values of 1 or -1. Let
$$
S=x_{1} x_{2}+x_{2} x_{3}+\cdots+x_{15} x_{1} \text {. }
$$

Then the smallest positive integer that $S$ can take is $\qquad$
4.3.

Let $y_{i}=x_{i} x_{i+1}(i=1,2, \cdots, 15)$, with the convention that $x_{16}=$ $x_{1}$. Then $y_{i}=1$ or -1.

In $y_{1}, y_{2}, \cdots, y_{15}$, let there be $a$ values that are 1 and $b$ values that are -1. Clearly, $a+b=15$.

Also, $1^{a}(-1)^{b}=y_{1} y_{2} \cdots y_{15}=\left(x_{1} x_{2} \cdots x_{15}\right)^{2}$ $=1$, so $b$ must be even.

Since $S$ is a positive integer, $S=a-b=15-2 b \geqslant 3$, at this point, $b=6$.
On the other hand, in $x_{1}, x_{2}, \cdots, x_{15}$,
$$
x_{2}=x_{5}=x_{8}=-1 \text {, }
$$

the rest are all 1, then $S=3$.
Therefore, the smallest positive integer that $S$ can take is 3.