How many ways are there to arrange $N$ black and white balls such that there is no sequence which has strictly more than 2 consecutive white or black balls.

So
BBWWBWBW is fine
but
BBWWWBWBW is not since there is a WWW sequence.

You have as many black and white balls as you want, but the total balls in the sequence is some value $N$.