We are given:
Write the values of \(2^{2004}\) and \(5^{2004}\) one after the other.
Now observe:
\[
2^{2004} \times 5^{2004} = (2 \times 5)^{2004} = 10^{2004}
\]
So, the product of the two numbers is \(10^{2004}\), which is a 1 followed by 2004 zeroes — total \(2005\) digits.
Now we need to find how many digits are there in \(2^{2004}\) and \(5^{2004}\) separately.
Use the digit formula:
\[
\text{Number of digits of } N = \lfloor \log_{10} N \rfloor + 1
\]
\[
\log_{10} (2^{2004}) = 2004 \log_{10} 2 \approx 2004 \times 0.3010 = 603.60
\Rightarrow \text{Digits in } 2^{2004} = 604
\]
\[
\log_{10} (5^{2004}) = 2004 \log_{10} 5 \approx 2004 \times 0.6990 = 1400.39
\Rightarrow \text{Digits in } 5^{2004} = 1401
\]
Total digits = \(604 + 1401 = 2005\)
But wait — the question says digits of both are "written one after another", which gives us:
\[
604 + 1401 = \boxed{2005}
\]