let () =
  let s = read_line () in
  let t = read_line () in
  Printf.printf "%d\n" @@
  Array.fold_left min max_int @@
  Array.init (String.length s - String.length t + 1) @@ fun i ->
    Array.fold_left ( + ) 0 @@
    Array.init (String.length t) @@ fun j ->
      if s.[i + j] = t.[j] then 0 else 1

