2015 AIME II Problem 12

There are 2^{10}=1024 possible 10-letter strings in which each letter is either an \mathrm{A} or a \mathrm{B}. Find the number of such strings that do not have more than 3 adjacent letters that are identical.