Deletion
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
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.
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Submissions 1K
Acceptance rate 13%