func main() var s: []char :: cui@input() var ans: int :: 0 var n: int :: 0 for i(0, ^s - 1) if(s[i] = 'S') do n :+ 1 end if if(i >= 2 & s[i - 2] = 'i' & s[i - 1] = 'n' & s[i] = 'g') do ans :+ n end if end for do cui@print("\{ans}\n") end func