You want to park the cars of guests on the street. According to the rules, it is forbidden to park cars:
in front of a private exit;
at a bus stop, as well as less than meters before it;
at a pedestrian crossing, as well as less than meters before or after it.
You have created plans for nearby streets by dividing them into segments of meters each (this is the minimum length required to park a car). In the plan: a segment with an exit is denoted by , a bus stop by , a crossing by , and all other segments by . Write a program that determines the number of valid parking spaces for each street.
The first line contains the number of streets (1 \leq n \leq 100). Each of the following lines contains a street plan as a string of length from to consisting only of the characters , , , and .
For each street plan, output a single line containing the number of valid parking spaces.

Example 1