| JPC 1.0 |
|---|
| Finished |
Man gave Abd a string $$$s$$$ of length $$$n$$$, and he asked him a very hard problem. Let's say that a string is good if its characters can be reordered so that it becomes a palindrome.
You must do the following operation exactly once: choose some index $$$i$$$ $$$(1 \leq i \leq n - 1)$$$ and split the string into two strings $$$A = s_1, ..., s_i$$$ and $$$B = s_{i+1}, ..., s_n$$$.
In how many ways can you do the operation such that the resulting strings are both good strings.
The first and only line consisting of the string $$$S$$$ $$$(1 \leq |S| \leq 10^5)$$$.
Print the number of ways you can do the operation so that the resulting strings are good.
abababa
2
abracadbra
0
juuaannn
4
| Name |
|---|


