local s = io.read() local t = io.read() if #t == 1 then if s:find(t) then print(-1) else print(0) end else local c = 0 local pos = 1 while true do z, pos = s:find(t, pos) if pos then c = c + 1 else break end end print(c) end