Problems
Deletion
Deletion
Given a string S. Get out of it the string "sis" with minimum number of removals. In one removal you can delete several consecutive characters.
Input
Given a string S (1 ≤ |S| ≤ 255), consisting of lowercase Latin letters.
Output
Print the minimum number of deletions to get out of line S the line "sis". If it is not possible to get sis, print -1.
Input example #1
ejudge
Output example #1
-1
Input example #2
sismotherapy
Output example #2
1
Input example #3
stictophyllous
Output example #3
2