1. Let $a_{1}, a_{2}, \cdots, a_{2015}$ be a sequence of numbers taking values from $-1, 0, 1$, satisfying
$$
\sum_{i=1}^{2015} a_{i}=5 \text {, and } \sum_{i=1}^{2015}\left(a_{i}+1\right)^{2}=3040,
$$

where $\sum_{i=1}^{n} a_{i}$ denotes the sum of $a_{1}, a_{2}, \cdots, a_{n}$.
Then the number of 1's in this sequence is $\qquad$
$=, 1.510$.
Let the number of -1's be $x$, and the number of 0's be $y$.
Then, from $\sum_{i=1}^{2015} a_{i}=5$, we know the number of 1's is $x+5$. Combining this with
$$
\begin{array}{c}
\text { the equation } \sum_{i=1}^{2015}\left(a_{i}+1\right)^{2}=3040, \text { we get } \\
\left\{\begin{array}{l}
x+(x+5)+y=2015, \\
4(x+5)+y=3040 .
\end{array}\right.
\end{array}
$$

Solving these equations, we get $x=505$.
Therefore, the number of 1's is 510.