Scanf.scanf "%d %s %s" @@ fun n s t ->
  let ls,lt = String.(length s, length t) in
  Array.init (ls+1) (fun i ->
    i, String.sub s 0 i ^ t) |> Array.to_list
  |> List.filter (fun (i, st) ->
      String.(sub st 0 ls = s && sub st i lt = t))
  |> List.hd |> snd |> String.length |> Printf.printf "%d\n"
