John and Brus have become very famous people all over the world, especially in Bolivia.
A man in Bolivia decided to write a story about them.
To make the story more truthful, he set up an interview with John.
He prepared a list of distinct simple "Yes" or "No" questions and he enlisted the help of two friends to transcribe the interview.
Each time he asked a question, one friend wrote down the question while the other friend wrote down the answer.
He was very nervous when conducting the interview, so he might have asked some of the questions multiple times.
However, John's answers always remained the same for the same questions.
Unfortunately, the friend who was writing down John's answers lost his list.
You are given a String[] questions, where the i-th element is the i-th question asked.
In a desperate attempt to remember the answers, the Bolivian has decided to write down all the possible ways that John might have answered the questions.
By doing this, he hopes that he will be able to recognize the correct combination of answers.
Return the total number of combinations that he will have to write down.
|