fun main() {
    val s = readLine()!!.toString()
    val t = readLine()!!.toString()

    val lenDiff = s.length - t.length
    (0..lenDiff).map { i ->
        val sub = s.substring(i, i + t.length)
        sub.zip(t) { sc, tc -> sc == tc}.count { it }
    }.max()!!.let { println(t.length - it) }
}