Expectation eg - N consecutive heads

While calculating X,

X = 1/2(X+1) + 1/4(X+2)+…

why is the last term equal to n/(2^n) and not (X+n)/2^n?

@aiman.mumtaz,
Because when you have already got n consecutive heads, you won’t have to do ‘X’ more tosses.