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.sub(i - 2, 3) = "ing") do ans :+ n end if end for do cui@print("\{ans}\n") end func