B. Born to be Here
time limit per test
0.6 seconds
memory limit per test
64 megabytes
input
standard input
output
standard output

In late January 2020, SnowballSH arrived in Chicago just a few days before international flights were cancelled. In 2021, he decided to attend Whitney M. Young Magnet High School after missing the Northside cutoff by exactly one point. Perhaps he was destined to be here?

SnowballSH loves the string "WY".

Given a string $$$s$$$ of length $$$n$$$, please help SnowballSH count the number of ordered pairs $$$(i, j)$$$, where $$$1 \le i \lt j \le n$$$, such that $$$s_i =$$$ W and $$$s_j =$$$ Y.

Input

The first line contains an integer $$$n$$$ ($$$1 \le n \le 10^6$$$).

The second line contains a string $$$s$$$ of length $$$n$$$.

It is guaranteed that $$$s$$$ contains only uppercase Latin alphabets.

Output

Output a single integer, the number of ordered pairs $$$(i, j)$$$, where $$$1 \le i \lt j \le n$$$, such that $$$s_i =$$$ W and $$$s_j =$$$ Y.

Examples
Input
20
WYMATHTEAMNOTWYOMING
Output
3
Input
21
YWWYYYWWWWYYYYYWWWWWW
Output
36
Note

For the first test, the desired pairs are $$$(1,2)$$$, $$$(1,15)$$$, and $$$(14,15)$$$, so the answer is $$$3$$$.