This question is more subtle than it appears on first glance. The number of samples we have to consider is the number of windows of 12 tosses in the full string of tosses. We slide this window of length twelve across the entire string. The general formula of the number of windows in a sliding window problem is
$$
N_{\text{windows}} = N - W + 1
$$
where $N$ is the size of the string we are scanning and $W$ is the size of the sliding window. In our case then, the number of windows is
$$
N_{\text{windows}} = 10^6 - 12 + 1 = 999,989.
$$
Any of these windows could contain the string of 6 $H$s followed by 6 $T$s. Therefore, the answer is
$$
\text{E}[6H, 6T] = \frac{999,989}{2^{12}} = 244.
$$