| Note | Name | Duration |
|---|
| W | whole note | 1 |
| H | half note | 1/2 |
| Q | quarter note | 1/4 |
| E | eighth note | 1/8 |
| S | sixteenth note | 1/16 |
| T | thirty-second note | 1/32 |
| X | sixty-fourth note | 1/64 |
The duration of a measure is the sum of the durations of its notes. In Marcos' jingles, each measure has the same duration. As Marcos is just a beginner, his famous teacher Johann Sebastian III taught him that the duration of a measure must always be 1.
For example, Marcos wrote a composition containing five measures, of which the first four have the correct duration and the last one is wrong. In the example below, each measure is surrounded with slashes and each note is represented as in the table above.
/HH/QQQQ/XXXTXTEQH/W/HW/
Marcos likes computers as much as music. He wants you to write a program that determines, for each one of his compositions, how many measures have the right duration.
The input contains several test cases. Each test case is described in a single line containing a string whose length is between 3 and 200 characters, inclusive, representing a composition. A composition begins and ends with a slash '/'. Measures in a composition are separated by a slash '/'. Each note in a measure is represented by the corresponding uppercase letter, as described above. You may assume that each composition contains at least one measure and that each measure contains at least one note. All characters in the input will be either slashes or one of the seven uppercase letters used to represent notes, as described above.
The last test case is followed by a line containing a single asterisk.
For each test case your program must output a single line, containing a single integer, the number of measures that have the right duration.