Assume you have a fair coin. What's the expected number of coin tosses in order to get a sequence HHTTHH? (H=head,T=tail).

Assuming you start tossing and keep going until your last six tosses match the sequence. 

I want to know if there is a general formula for this kinds of problems?