A string of length consisting of s and s is given. By repeatedly performing the operation of swapping two adjacent characters, you want to make the number of adjacent character pairs that are different from each other be even. Find the minimum number of operations required. Print -1 if it is impossible.
The input is given in the following format.
Print the answer to the problem on the first line.
| 2 | 18 | . |
| 3 | 23 | . |
| 4 | 37 | No additional constraints. |