let mutable s = stdin.ReadLine () let t = stdin.ReadLine () let firstLength = s.Length let length = t.Length let findIndex (str: string) (search: string) = let mutable index = -1 for i in 0..str.Length-search.Length do if index = -1 && str.[i..i+search.Length-1] = search then index <- i index if length = 1 then if s |> Seq.contains t.[0] then printfn "-1" else printfn "0" else while findIndex s t <> -1 do let index = findIndex s t s <- s.[..index+t.Length-2] + "." + s.[index+t.Length-1..] s.Length - firstLength |> printfn "%d"