11. Given $0 \leqslant a_{k} \leqslant 1(k=1,2, \cdots, 2002)$, let $a_{2003}=a_{1}, a_{2004}=a_{2}$. The maximum value of $\sum_{k=1}^{20002}\left(a_{k}-a_{k+1} a_{k+2}\right)$ is $\qquad$ .
11. 1001

From $0 \leqslant a_{k} \leqslant 1$, we get $\left(1-a_{k}\right)\left(1-a_{k+1}\right) \geqslant 0(k=1,2, \cdots, 2002)$.
Therefore, $1 \geqslant a_{k}+a_{k+1}-a_{k} a_{k+1} \geqslant a_{k}+a_{k+1}-2 a_{k} a_{k+1}$, hence
$$
2002 \geqslant \sum_{k=1}^{2002}\left(a_{k}+a_{k+1}-2 a_{k} a_{k+1}\right)=2 \sum_{k=1}^{2002}\left(a_{k}-a_{k+1} a_{k+2}\right),
$$

which means $\sum_{k=1}^{2002}\left(a_{k}-a_{k+1} a_{k+2}\right) \leqslant 1001$. The equality holds when $a_{1}=a_{3}=\cdots=a_{2001}=1$, and the rest are 0.