5. Find the sum: $\left[\frac{1}{3}\right]+\left[\frac{2}{3}\right]+\left[\frac{2^{2}}{3}\right] \cdots+$ $\left[\frac{2^{2008}}{3}\right]+1004=$ (where $[x]$ denotes the greatest integer not exceeding $x$)
5. $\frac{1}{3}\left(2^{2009}-2\right)$.

Solution: First, consider $\frac{2}{3}+\frac{2^{2}}{3}+\cdots+\frac{2^{2008}}{3}$, its value is $\frac{1}{3}\left(2^{2009}\right.$ -2 ).

Next, consider the sum of their integer parts. In the above sum, no term is an integer, but the sum of any two consecutive terms is an integer (since $\frac{2^{k}}{3}+\frac{2^{k+1}}{3}=2^{k}$). Note that the sum of two non-integers is an integer, so the sum of their integer parts is 1 less than the sum of the terms themselves.
$$
\begin{array}{l}
\text { Therefore, } S=\left[\frac{1}{3}\left(2^{2009}-2\right)-1004\right]+1004= \\
\frac{1}{3}\left(2^{2009}-2\right) .
\end{array}
$$