F. Flamingo Lake
time limit per test
6 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

Every winter, flamingos visit Larnaca Salt Lake in Cyprus. As rain fills the lake, more shallow water becomes available for the birds. To study how the flamingos spread out, consider the following simplified model. Initially, a rectangular lake consists of a single cell, and that cell contains a flamingo.

There are $$$n$$$ events. In each event, the lake expands either by one row along its entire southern side, or by one column along its entire eastern side.

For each newly added cell, a flamingo arrives if none of the old cells sharing a side or a corner with it contains a flamingo. Here, old cells are the cells that belonged to the lake before this event. All new cells are checked simultaneously: flamingos arriving during the same event do not affect each other. Flamingos that have already arrived stay in their cells.

Help scientists find the total number of flamingos at the lake after all events.

Input

The first line contains an integer $$$n$$$ ($$$1\le n\le 10^6$$$), the number of events.

The second line contains a string of $$$n$$$ characters. The $$$i$$$-th character is S if the $$$i$$$-th event adds a row to the south, or E if it adds a column to the east.

Output

Print one integer: the number of flamingos at the lake after all events.

Examples
Input
4
SSEE
Output
5
Input
10
SEESSSEEES
Output
12
Note

Illustrations for the examples: