output_description: Print the minimum number of characters in S that need to be changed.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
      T
attempt: s=input()
  t=input()
  
  t_substrings=[]
  for i in range(len(t)+1):
    for j in range(i):
      t_substrings.append(t[j:i])
    
  t_substrings=list(set(t_substrings))
  #print(t_substrings)
  
  ans=len(t)
  for str in t_substrings:
    num=s.rfind(str)
    num_t=t.rfind(str)
    #print("str",str)
    #print("num",num)
    if num==-1:
      pass
    elif num+len(str)-1>=len(s):
      pass
    elif num_t-num>=0:
      pass
    else:
     # print("##")
      ans=min(len(t)-len(str),ans)
      #print(ans)
    #print("----------------")
  print(ans)
      
    
problem_description: Statement
  
  Given are two strings S and T.
  
  Let us change some of the characters in S so that T will be a substring of S.
  
  At least how many characters do we need to change?
  
  Here, a substring is a consecutive subsequence. For example, `xxx` is a
  substring of `yxxxy`, but not a substring of `xxyxx`.
samples: [{"input": "cabacc\n    abc", "output": "1\n    \n\nFor example, changing the fourth character `a` in S to `c` will match the\nsecond through fourth characters in S to T.\n\nSince S itself does not have T as its substring, this number of changes - one\n- is the minimum needed.\n\n* * *"}, {"input": "codeforces\n    atcoder", "output": "6"}]