[This non-trivial undergraduate level statistics question is self-answered and adds to the knowledge pool.]
Question
A (possibly biased) coin with heads probability $p$ is tossed $n$ times, and the number of heads, $N$, is counted. The coin is then tossed $N$ more times. Find the expected total number of heads generated by this process.
The following solution is suggested.