
import scala.io.StdIn

object Main extends App {
  val mainStr = StdIn.readLine()
  val subStr = StdIn.readLine()

  val ans = subStr.length -
    (for(i <- 0 until mainStr.length - (subStr.length -1))yield{
      (for(j <- 0 until subStr.length if mainStr(i+j) == subStr(j))yield 1)
        .sum
    }).max

  println(ans)
}






