Find the number of sequences of 10 letters where all the letters are either $A$ or $B$, the first letter is $A$, the last letter is $B$, and the sequence contains no three consecutive letters reading $ABA$. For example, count $AAABBABBAB$ and $ABBBBBBBAB$ but not $AABBAABABB$ or $AAAABBBBBA$.

Let's think step by step and output the final answer within \boxed{}.
user