#### Жишээ тэстүүд

##### Оролт
codeforces
2 0 0
o 1 2
e 1 2

##### Гаралт
7

##### Оролт
codeforces
2 1 1
o 1 2
o 1 2

##### Гаралт
0


## Тэмдэглэл

In the first test we should count the number of strings that do not contain characters "e" and "o". All such strings are as follows (in the order of occurrence in the initial string from the left to the right): "c", "d"', "f", "r", "rc", "c", "s".

In the second test we cannot achieve fulfilling exactly one of the two identical constrictions, so the answer is 0.