Two players play a game using a deck of cards: red and black. Initially the deck is shuffled into one of the possible starting configurations. Play then proceeds, alternating turns, where a player follows two steps on each turn:
Remove the top card from the deck, taking note of its colour.
If there is a next card and it is the same colour as the previous card they toss a fair coin. If the coin lands on heads they remove that card as well; otherwise leave it on top of the deck.
The player who removes the final card from the deck wins the game.
Some starting configurations give an advantage to one of the players; while some starting configurations are fair, in which both players have exactly chance to win the game. For example, if there are four starting configurations which are fair: RRBB, BBRR, RBBR, BRRB. The remaining two, RBRB and BRBR, result in a guaranteed win for the second player.
Define to be the number of starting configurations which are fair. Therefore . You are also given .