There is a string $$$S$$$ of length $$$N$$$ consisting of uppercase English letters. You may perform the following operation on $$$S$$$ any number of times.
The first line contains an integer $$$N$$$. ( $$$1 \leq N \leq 5 \times 10^5$$$ )
The second line contains a string $$$S$$$ of length $$$N$$$ consisting of uppercase English letters.
Print the answer.
10KKUPCUCAPC
1164
4TUNA
0
30KUCCKCKKPUKUPCUCPUCKPCKKUUPCPK
619704
Note that you are asked for the remainder of the maximum value, not the maximum possible remainder.
For the first example, you can earn $$$1164$$$ yen by performing the following operations.
For the second example, no operation can be performed even once, so print $$$0$$$.
| Name |
|---|


