fun main(args: Array<String>) {
    val s = readLine().orEmpty()
    val t = readLine().orEmpty()
    val sLen = s.length
    val tLen = t.length
    val lenDiff = sLen - tLen
    (0 .. lenDiff)
        .map { i ->
            val sub = s.substring(i, i + tLen)
            sub.zip(t) { sc, tc -> sc == tc }.count { it }
        }
        .max()!!
        .let { println(tLen - it) }
}
