3. Given for any $x_{1}, x_{2}, \cdots, x_{2020} \in[0,4]$,

the equation
$$
\left|x-x_{1}\right|+\left|x-x_{2}\right|+\cdots+\left|x-x_{2020}\right|=2020 a
$$

has at least one root in the interval $[0,4]$. Then $a$ equals
$\qquad$ .
3. 2 .
$$
\text { Let } \begin{aligned}
f(x)= & \left|x-x_{1}\right|+\left|x-x_{2}\right|+\cdots+ \\
& \left|x-x_{2020}\right|-2020 a .
\end{aligned}
$$

Then $f(0)=x_{1}+x_{2}+\cdots+x_{2020}-2020 a$,
$$
f(4)=8080-\left(x_{1}+x_{2}+\cdots+x_{2000}\right)-2020 a \text {. }
$$

Therefore, $f(0)+f(4)=8080-4040 a$
$$
=4040(2-a) \text {. }
$$

When $a=2$,
$$
f(0)+f(4)=0, f(0) f(4) \leqslant 0 \text {, }
$$

Thus, $f(x)$ has at least one real root in the interval $[0,4]$.