Sakurako is Late
Another day at school: another time Sakurako is late!
Today she overslept and needs to get to school as fast as possible.
There are pedestrian crossings that separate Sakurako from her school; each of them contains a single traffic light. Each traffic light is either green or red. The color of each traffic light changes every minute.
Sakurako is not really fast, so she spends one minute in order to cross one pedestrian crossing. Also, she is very law-obedient, so she will not cross the crossing if the light is red. Lastly, she will cross the street if the light is green.
Determine what is the minimum time that Sakurako needs to spend in order to get to the school.
Input
The first line contains one integer , which denotes the number of pedestrian crossings that Sakurako needs to cross.
The second line contains a string of characters that represent the initial color of each traffic light; each character is either "G
" (green) or "R
" (red). The first character stands for the color of the closest traffic light, and the last character stands for the furthest traffic light.
Output
In a single line output, a single integer which denotes the minimum time needed for Sakurako to cross the crossings.
Examples
Note
In the first example, Sakurako may move in a following way:
Time :
Sakurako is in position .
Time :
Sakurako is in position and starts moving across the -st pedestrian crossing.
Time :
Sakurako is in position and starts moving across the -nd pedestrian crossing.
Time :
Sakurako is in position and starts moving across the -rd pedestrian crossing.
Time :
Sakurako is in position .
Time :
Sakurako is in position and starts moving across the -th pedestrian crossing.
Time :
Sakurako is in position and starts moving across the -th pedestrian crossing.
Time :
Sakurako passed all crossings.
In the second example, we can show that the minimal time that Sakurako needs to cross all the crossings is .
Scoring
You will receive at least points if your solution works correctly for ; that is, all the colors are the same.
You will receive at least points if your solution works correctly for ; that is, all adjacent colors are different.