A string of length is given. consists only of the characters . In one operation, you can choose two adjacent characters in the current string and delete them simultaneously. After deleting the characters, the remaining characters are concatenated together while maintaining their order. You want to use the minimum number of operations so that the character and the character never appear in the remaining string. If it is possible, print the minimum number of operations required, and if it is impossible, print .
Input
The input is given in the following format.
Output
If it is possible to perform operations so that and never appear in the resulting string, print the minimum number of operations required. If it is impossible, print instead.
Constraints
- .
- is a string of length consisting only of the characters .