func main() var s: []char :: cui@input() var t: []char :: cui@input() if(^t = 1) for i(0, ^s - 1) if(s[i] = t[0]) do cui@print("-1\n") ret end if end for do cui@print("0\n") ret end if var tpos: int :: 0 var ans: int :: 0 for i(0, ^s - 1) if(s[i] = t[tpos]) do tpos :+ 1 if(tpos = ^t) do ans :+ 1 do tpos :: 0 if(s[i] = t[0]) do tpos :+ 1 end if end if else do i :- tpos do tpos :: 0 end if end for do cui@print("\{ans}\n") end func