Steps#7669

Steps

0.1 seconds
64 megabytes
Very easy

After celebrating Petryk's birthday, Stepan took him for a walk. Petryk was full of energy—laughing, jumping, and running. As they wandered through the park, they came across a set of stairs leading to some attractions. Petryk began jumping from step to step. If he pushed off weakly, he would jump to the next step; if he pushed off strongly, he would skip a step.

Determine which step Petryk will land on if he starts on step number of a staircase with steps in total.

Input

The input consists of a single line with three pieces of information separated by spaces: the number (1 \leq N \leq 1000), representing the total number of steps; the number (0 \leq M \leq N), indicating the step Petryk is currently on; and a character that specifies the strength of his jump: S for a strong jump or W for a weak jump.

Output

The output should be a single number, representing the step number where Petryk will land after his jump.

Examples

Example 1

Loading
Loading