function Main(input){
    let s = (input.split("\n")[0]).split("");
    let t = (input.split("\n")[1]).split("");
    let num = 0;
    let ans = t.length;
    for(let i = 0; i < s.length - t.length; i++){
        for(let a = 0; a < t.length; a++){
            if(t[a] != s[i+a]){
                num++;
            }
        }
    }
    num <= t.length? console.log(ans = num) : console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));