2. Given $n+2$ real numbers
$$
a_{1}, a_{2}, \cdots, a_{n}, 16, a_{n+2} \text {, }
$$

where the average of the first $n$ numbers is 8, the average of the first $n+1$ numbers is 9, and the average of these $n+2$ numbers is 10. Then the value of $a_{n+2}$ is $\qquad$
2. 18 .

From the condition, $\frac{8 n+16}{n+1}=9 \Rightarrow n=7$.
Also, $\frac{8 \times 7+16+a_{n+2}}{7+1+1}=10 \Rightarrow a_{n+2}=18$.