4. Given non-zero real numbers $a_{1}, a_{2}, \cdots, a_{n}$ satisfy $\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots+\frac{1}{a_{n}} \neq 0$,
$$
S=a_{1}+a_{2}+\cdots+a_{n}=-2020,
$$

then the solution to $\frac{x+S-a_{1}}{a_{1}}+\frac{x+S-a_{2}}{a_{2}}+\cdots+\frac{x+S-a_{n}}{a_{n}}=-n$ is $x=$ $\qquad$ .
$2020$