Hide

# Problem H

Zebras and Ocelots

Ocelot by
Jitze Couperus. Zebra by
Henryk NiestrÃ³j. Composed by Larry Pyeatt.

## Input

Input consists of a number $N$ in the range $1$ to $60$, followed by $N$ lines, each of which is a single
character, either `Z` (for zebra) or
`O` (for ocelot). These give the order of the
creatures from top (first) to bottom (last).

## Output

Output should be a single integer giving the number of times the bell must toll in order for there to be no more ocelots.

Sample Input 1 | Sample Output 1 |
---|---|

3 Z O Z |
2 |

Sample Input 2 | Sample Output 2 |
---|---|

4 O Z Z O |
9 |