negative binomial distribution with parameters r = k+1 and p = 1/2. The mean of this distribution is k+1. So given k heads on the first round, the expected number of tails is on the second round is k+1 and the expected number of flips including the heads is 2(k+1). Thus E(Y|k) = 2k+2.
Using the law of total expectation,
E(Y) = E(E(Y|k)) = E(2k+2) = 2E(k) + 2 = 2(n/2) + 2 = n + 2
since E(k) is just the mean n/2 of the binomial(n,1/2) distribution.