You are given a string of length . consists only of , , and .
In one operation, choose two adjacent different characters and delete both of them. The remaining parts are concatenated.
Repeat the operation until no operation is possible. Find the number of distinct strings that can remain. The empty string is also counted.
The input is given from Standard Input in the following format:
For each test case, print the number of distinct possible final strings on one line.
Each case is given in the following format:
| 3 | 25 | The sum of over all test cases does not exceed . |
| 4 | 49 | The sum of over all test cases does not exceed . |
| 5 | 23 | No additional constraints. |