peterverebics/CodeNet_Python_118 huggingface dataset:
d,t,s =map(int,input().split())
if d >= t*s:
    print('Yes')

else:
    print('No')
d,t,s=map(int,input().split())
print('Yes' if d<t*s else 'No')
d,t,s=map(int,input().split())
actualTime=d/s

if actualTime<t:
  print('Yes')
else:
  print('No')
ch=input("enter your values ")
ch=ch.split(" ")
vitess=float(ch[0])/float(ch[1])
if vitess<float(ch[2]):
  print("No")
print("Yes")
d,t,s=map(int,input().split( ))
if(t>=int(d/s)):
    print("Yes")
else:
    print("No")
D,T,S = map(int,input().split())

if  T*S>=D:
    print("YES")
else:
    print("NO")
D, T, S = map(int, input().split())
if (D/S) >= T:
  print("Yes")
else:
  print("No")
D,T,S = map(int,input().split())
if (D // S) <= T:
  print("Yes")
else:
  print("No")
D,T,N = map(int,input().split())
if D/T <= N :
    print("YES")
else :
    print("NO")
D, T, S = list(map(int, input().split(" ")))



time=D/S

if time <= T:
    print("yes")
else:
    print("no")
s = input().split()
d = int(s[0])
t = int(s[1])
s = int(s[2])
if d >= t * s:
  print("Yes")
else:
  print("No")
d,t,s=map(int,input().split())
print('Yes') if (d+1)//s<=t else print('No')
D, T, S = map(int, input().split())
if D//S == T and D % S == 0:
  print("Yes")
elif D//S>T:
  print("No")
else:
  print("Yes")
from sys import stdin

arr = [int(x) for x in stdin.readline().split()]

if (arr[0]/arr[2] > arr[1]):
    print("Yes")
else:
    print("No")
d, t, s = list(map(int, input().split()))
if d/s < t:
  print('Yes')
else:
  print('No')
d, t, s = map(int, input().split())

if d - t * s >= 0:
    print('No')
else:
    print('Yes')
D,T,S = map(int,input().split())

if D < S * T:
    print('No')
else:
    print('Yes')
d,t,s = map(int,input().split())
if t >= (d / s):
	print("yes")
else:
	print("no")
str = input()
str = [int(x) for x in str.split()]

if(str[0] > str[1] * str[2]):
  print("no")
else:
  print("yes")
d,t,s=map(int,input().split())
if( t >=  d//s ):
  print("Yes")
else:
  print("No")
d, t, s = map(int, input().split())
u = d / s

if t > u :
  print("Yes")
else :
  print("No")
d,t,s = map(int,input().split())
if d/s < t:
    print("Yes")
else:
    print("No")
d,t,s=map(int,input().split())
if(d/s<=t):
  print("YES")
else:
  print("NO")
D, T, S = map(int, input().split())

if D / S <= T:
    print('Yes')
else:
    print('No')
print(D/S)
D, T, S = map(int, input().split())
if D//S > T:
  print('No')
else:
  print('Yes')
D,T,S = list(map(int,input().split(" ")))
if D <= T * S:
  print("YES")
else:
  print("NO")
A, B, C = map(int, input().split())
if A/C < B:
    print("Yes")
else:
    print("No")
D, T, S=list(map(int, input().split()))

a = T * S

if a >= D :
    print("YES")
else:
    print("NO")
d, t, s = [int(x) for x in input().split(' ')]
if t*s <= d:
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-

D, T, S = map(int, input().split())

if D <= T*S:
    print("yes")
else:
    print("no")
D, T, S = [int(s) for s in input().split()]
print('Yes' if D // S <= T else 'No')
D, T, S = map(int, input().split())
if D / S >= T:
  print('YES')
else:
  print('NO')
a, b, c = map(int, input().split())




time=a/c
if time <= b:
    print("yes")
else:
    print("no")
d,t,s=map(int,input().split())

if t*s >= t:
    print('Yes')
else:
    print('No')
def func():
	d, t, s = list(map(int, input()))
	return s * t >= d
D,T,S = map(int,input().split())
if D <= T * S:
  print("YES")
else:
  print("NO")
#n = int(input())
d,t,s = map(int,input().split())
#a_L = list(map(int,input().split()))

if d/s < t:
    print("No")
else:
    print("Yes")
d, t, s = map(int, input().split())
if s*t <= d:
    print("Yes")
else:
    print("No")
a = list(map(int,input().split()))
if(a[0]>a[1]*a[2]):
    print('no')
else:
    print('yes')
d, t, s = map(int, input().split())
if d < t * s:
    ans = 'Yes'
else: ans = 'No'
print(ans)
D,T,S=[int(x) for x in input().split()]
if D//S<T:
  print("Yes")
else:
  print("No")
s = input()
t = input()
c = []

for j in range(len(s)-len(t)+1):
    counter = 0
    for i in range(len(t)):
        if(s[i+j] == t[i]):
#            print("i,j=",i,j)
            counter += 1

#    print(counter)
    c.append(counter)

print(len(t)-max(c))
s = input()
t = input()
c = 0

for i in range(len(s) - len(t) + 1):
    c_1 = 0
    for j in range(len(t)):
        if s[i + j] == t[j]:
            c_1 += 1
    if c < c_1:
        c = c_1

print(len(t) - c)
s= input()
t= input()

atmp=2000
for i in range(len(s) - len(t) + 1):
    s1=s[i:i+len(t)]
    #print(s1)
    tmp=0
    for j in range(len(t)):
        if s1[j]!=t[j]:
            tmp+=1
    atmp=min(atmp,tmp)
        
print(atmp)
s = input()
t = input()
ans = 10000
if t in s:
    print(0)
    exit()

for i in range(len(s)-len(t)+1):
    cut = s[i:i+len(t)]
    cnt = 0
    for k, j in zip(cut, t):
        if k != j:
            cnt += 1
    ans = min(ans, cnt)

print(ans)
S = list(input())
T = list(input())

out=[]
for i in range(len(S)-len(T)+1):
    cnt=0
    for j in range(len(T)):
        if S[i+j] != T[j]:
            cnt+=1
    out.append(cnt)
print(min(out))
s=input()
t=input()

max=0
count=0
for i in range(len(s)-len(t)+1):
    count=0
    for j in range(len(t)):
        if s[i+j]==t[j]:
            count+=1
    if count > max:
        max=count
        
print(len(t)-max)
S = list(input())
T = list(input())

def kakikae_count(S_i):
    count = 0
    for i in range(len(T)):
        if S[S_i + i] != T[i]:
            count += 1
    return count

min_count = len(T)
for i in range(0, len(S) - len(T) + 1):
    need_count = kakikae_count(i)
    if need_count < min_count:
        min_count = need_count
print(min_count)
S=input()
T=input()
count=0
ans1=len(S)+1
ans=0
for i in range(len(S)-len(T)+1):
    count=count+i
    for j in range(len(T)):
        if S[count]!=T[j]:
            ans+=1
        count+=1
    if ans<ans1:
        ans1=ans
    ans=0
    count=0
print(ans1)
s = input()
t = input()

lens = len(s)
lent = len(t)

total = 100000000
for i in range(lens-lent+1):
    count = 0
    for j in range(lent):
        if s[i+j]!=t[j]:
            count+=1
    total = min(total,count)

if total == 100000000:
    print(lent)
else:
    print(total)
S = input()
T = input()

ans = len(T)
for i in range(len(S)-len(T)+1):
  t = len(T)
  for j in range(len(T)):
    if S[i+j] == T[j]:
      t -= 1
  # print(t)
  ans = min(ans, t)
print(ans)
def count(x,y):
	c = 0
	for i in range(len(x)):
		c += (x[i]!=y[i])
	return c
s = input()
t = input()
mx = len(s)
for i in range(0, len(s) - len(t) + 1):
	c = count(s[i:i+len(t)], t)
	mx = min(mx,c)
print(mx)
S=input().strip()
T=input().strip()
ls = len(S)
lt = len(T)

x = lt
for i in range(0,ls-lt+1):
    m = 0
    for j in range(lt):
        if T[j] != S[i+j]:
            m += 1
    x = min(x,m)

print(x)
s=input()
t=input()
ans=len(t)
cnt=0

for _ in range(len(s)):
  if _+len(t)>len(s):
    break
  mj=s[_:_+len(t)]
  for i in range(len(t)):
    if mj[i]!=t[i]:
      cnt += 1
  if ans>cnt:
    ans=cnt
  cnt=0
    
print(ans)
s = list(input())
t = list(input())


max_change = len(t)
for start in range(len(s) - len(t) +1):
    diff =0
    for i in range(len(t)):
        if s[start + i] != t[i]:
            diff += 1
    if diff <= max_change:
        max_change = diff
print(max_change)
S = input()
T = input()

iteration = len(S) - len(T) + 1

if T in S:
    ans = 0
else:
    minimum = len(T)
    for i in range(iteration):
#         print('---------------')
        s = S[i:len(T)+i]
#         print(s)
#         print(T)
        count = 0
        for j in range(len(T)):
            if s[j] != T[j]:
                count += 1
#             print(count)
        minimum = min(minimum, count)
    ans = minimum
    
print(ans)
S=input()
T=input()
s=len(S)
t=len(T)
A=[]


for i in range(s-t+1):
  word=S[i:i+t]
  a=0
  for j in range(t):
    if word[j]==T[j]:
      a+=1
    else:
      a+=0
  A.append(t-a)

print(min(A))
S=input()
T=input()
n=len(T)
l=len(S)-n
p=0
for i in range(l+1):
    j=0
    m=S[i:i+n]
    
    for k in range(n):
        if(m[k]==T[k]):
            j+=1

    if(p<j):
        p=j
print(n-p)
s = input()
t = input()

max_val = 0
index = 0
for i in range(len(s)- len(t) + 1):
    val = 0
    for c in range(len(t)):
        if s[i + c] == t[c]:
            val += 1
            if val > max_val:
                max_val = val
                index = [i]

print(len(t) - max_val)
s = input()
t = input()

cur = 0
count_min = 1000
while cur + len(t) -1 < len(s):
    count = 0
    for i in range(len(t)):
        if t[i] != s[i + cur]:
            count += 1
    if count < count_min:
        count_min = count
    cur += 1
print(count_min)
s = input()
t = input()
y = 1001
for i in range(len(s) - len(t) + 1): #sの始め
    x = 0
    for j in range(len(t)): #何文字目を調べるか
        if s[i + j] != t[j]:
            x += 1
    if x < y:
        y = x
print(y)
# B

S=input()
T=input()

def check(i,T):
    ns=S[i:i+len(T)]
    res=0
    for i in range(len(T)):
        if ns[i]!=T[i]:
            res+=1
    return res

print(min([check(i,T) for i in range(len(S)-len(T)+1)]))
s = input()
t = input()
 
ans = 10000
for i in range(len(s) - len(t) + 1):
  tmp = 0
  for j in range(len(t)):
    if s[i + j] != t[j]:
      tmp+=1
  ans = min(ans, tmp)
print(ans)
S=input()
T=input()
ans=0

for i in range(len(S)-len(T)+1):
  temp=S[i:i+len(T)]
  cnt=0
  for j in range(len(T)):
    if T[j]==temp[j]:
      cnt+=1
  else:
    ans=max(ans,cnt)
print(len(T)-ans)
def main():
    S = str(input())
    T = str(input())

    max = 0
    for i in range(len(S)-len(T)+1):
        count = 0
        for n in range(len(T)):
            if S[i+n] == T[n]:
                count += 1
        if count > max:
            max = count
    print(len(T) - max)


main()
s=input()
t=input()
ans=10000
for i in range(len(s)-len(t)+1):
    tmp=0
    for j in range(len(t)):
        if s[i+j]!=t[j]:
            tmp+=1
    ans=min(ans,tmp)
print(ans)
S = input()
T = input()
max_count = 0
for i in range(len(S)-len(T)+1):
    count = 0
    for j in range(len(T)):
        if S[i+j] == T[j]:
            count += 1
    max_count = max(max_count, count)
print(len(T) - max_count)
import sys

s = input()
t = input()
difl = []

for i in range(len(s)-len(t)+1):
    if s[i:i+len(t)] == t:
        print(0)
        sys.exit()
    else:
        dif = 0
        for j in range(len(t)):
            if s[j+i] != t[j]:
                dif += 1
    difl.append(dif)

print(min(difl))
S=input()
T=input()
ans=len(T)

if len(T)!=len(S):
    for j in range(len(S)-len(T)+1):
        total=0
        for i in range(len(T)):
            if S[i+j]!=T[i]:
                total+=1
        if ans>=total:
            ans=total
else:
    ans=0
    for j in range(len(T)):
        if T[j]!=S[j]:
            ans+=1

print(ans)
s = list(input())
t = list(input())

len_s = len(s)
len_t = len(t)
count = 0
biggest = 0

for i in range(len_s-len_t+1):
  now = s[i:i+len_t]

  for j in range(len_t):
    if t[j] == now[j]:
      count += 1
      
  if biggest < count:
    biggest = count
    count = 0
  else:
    count = 0
    
print(len_t - biggest)
S = input()
T = input()

lstS = list(S)
lstT = list(T)

difMin = 1000

for i in range(len(lstS)-len(lstT)+1):
  dif = 0
  
  for j in range(len(lstT)):
    if(lstT[j] != lstS[i+j]):
      dif += 1
  
  if(dif < difMin):
    difMin = dif

print(difMin)
S = list(input())
T = list(input())

lst_of_values = []
for i in range(len(S)):
    current = 0
    if i + len(T) > len(S):
        break

    k = 0
    for j in range(i, i+len(T)):
        if S[j] != T[k]:
            current += 1
        k+=1
    lst_of_values.append(current)
    k=0

print(min(lst_of_values))
from sys import stdin,stdout
from collections import defaultdict
import math
from bisect import bisect
input=stdin.readline
#def print(x):stdout.write(str(x)+'\n')
s=input().strip()
t=input().strip()
n=len(s)
m=len(t)
ans=m
for i in range(n-m+1):
    c=0
    for j in range(min(m,n)):
        if s[i+j]!=t[j]:
            c+=1
    ans=min(c,ans)
print(ans)
S = list(input())
T = list(input())
cmin = 1000

for i in range(len(S)-len(T)+1):
    c = 0
    s = S[i:i+len(T)]
    for j in range(len(T)):
        if s[j] != T[j]:
            c += 1
    cmin = min(c,cmin)

print(cmin)
s = list(input())
t = list(input())
m = 0
for i in range(len(s)-len(t)+1):
    x = 0
    for j in range(len(t)):
        if t[j] == s[i+j]:
            x+=1
    if x > m:
        m = x
ans = len(t)-m
print(ans)
s = list(input())
t = list(input())

min = len(t)

for i in range(len(s) - len(t) + 1):
    
    diff = 0
    
    for j in range(len(t)):
        if t[j] != s[i + j]:
            diff += 1
    
    if diff < min:
        min = diff
    
    
print(min)
S = [i for i in input()]
T = [i for i in input()]
N = len(T)
ans = 10**10
for i in range(len(S)-N+1):
     X = S[i:i+N]
     a = N
     for j in range(N):
         if X[j] == T[j]:
             a -= 1
     ans = min(ans, a)
print(ans)
S = input()
T = input()

min_count = 1000
for idx in range(len(S) - len(T) + 1):
    s = S[idx:idx+len(T)]
    count = sum([1 if tc!=sc else 0 for tc, sc in zip(T, s)])
    min_count = min(min_count, count)

print(min_count)
s = input()
t = input()
ans = 1001001001
for i in range(len(s) - len(t) + 1):
    cnt = 0
    for j in range(len(t)):
        if s[i + j] != t[j]:
            cnt += 1
    if cnt <= ans:
        ans = cnt
print(ans)
S = input()
T = input()
ans = float('inf')

for i in range(len(S)-len(T)+1):
  tmp = 0
  for a,b in zip(S[i:i+len(T)],T):
    if a!=b:
      tmp+=1
  ans = min(ans,tmp)
  
print(ans)
s = input()
t = input()
ans = len(t)
for i in range(len(s) - len(t) + 1):
    ss = s[i:i + len(t)]
    # print(ss)
    cnt = 0
    for i,e in enumerate(ss):
        if e != t[i]:
            cnt += 1
    # print(cnt)
    ans = min(ans,cnt)

print(ans)
#-*-coding:utf-8-*-

import sys

def n_gram(target, n):
    return [ target[idx:idx + n] for idx in range(len(target) - n + 1)]

def main():
    s = input()
    t = input()
    ans_list=[]
    ans=[]
    count=0

    ans_list=n_gram(s,len(t))

    for word in ans_list:
        for str1,str2 in zip(word,t):
            if str1==str2:
                count+=1
        ans.append(count)
        count=0
    print(len(t)-max(ans))

if __name__ == "__main__":
    main()
s = input()
t = input()

ans = 0
for i in range(len(s)-len(t)+1):
    cnt = 0
    for j in range(len(t)):
        if s[i+j] == t[j]:
            cnt += 1
    ans = max(ans,cnt)

print(len(t)-ans)
s = input()
t = input()
n = len(s)
m = len(t)
ans = m
for i in range(n-m+1):
    p = 0
    for j in range(m):
        if s[i+j] != t[j]:
            p += 1
    ans = min(ans,p)
print(ans)
S = str(input())
T = str(input())
m = len(S)
n = len(T)
mn = m
for i in range(m-n+1):
    sub = S[i:i+n]
    counter = 0
    for j in range(n):
        if sub[j] != T[j]:
            counter += 1
    if mn > counter:
       mn = counter 
print(mn)
s=list(input())
t=list(input())
ans=len(t)
for i in range(len(s)-len(t)+1):
    tmp=0
    for j in range(len(t)):
        if s[i+j]!=t[j]:
            tmp+=1
    ans=min(ans,tmp)

print(ans)
s =list(input())
t=list(input())
ans=[]
for i in range(len(s)-len(t)+1):
    check=0
    s_check=s[i:i+len(t)]
    for k in range(len(s_check)):
        if s_check[k]==t[k]:
            check+=1
    ans.append(check)
print(len(t)-max(ans))
S = input()
T = input()
d = len(S) - len(T)
print(len(T) - max(sum(t == s for t, s in zip(T, S[i : i + len(T) + 1])) for i in range(d + 1)))
S = input()
T = input()

ls = len(S)
lt = len(T)
ans = 1<<60
for i in range(ls-lt+1):
    cnt = 0
    X = S[i:i+lt]
    for x, t in zip(X, T):
        if x != t:
            cnt += 1
    ans = min(ans, cnt)
print(ans)
#!/usr/bin/env python3
def main():
    S = input()
    T = input()

    ans = 10 ** 6
    for i in range(len(S) - len(T) + 1):
        cnt = 0
        for j in range(len(T)):
            if S[i + j] != T[j]:
                cnt += 1
        ans = min(ans, cnt)
    print(ans)


if __name__ == '__main__':
    main()
s = input()
t = input()
x = len(s)-len(t)
ans = 10**9
for i in range(x+1):
    cnt = 0
    for j in range(len(t)):
        if s[i+j] != t[j]:
            cnt += 1
    ans = min(ans, cnt)
print(ans)
s = str(input())
t = str(input())
w = []
for i in range(len(s)-len(t)+1):
    num = 0
    for h in range(len(t)):
        if t[h] == s[i+h]:
            num += 1
    w.append(len(t)-num)
print(min(w))
s = input()
t = input()
list1 = list()
y = list()
for i in range(len(s)):
    if i < (len(s)-len(t)+1):
        list1.append(s[i:(i+len(t))])
for j in range(len(list1)):
    count = 0
    for k in range(len(t)):
        if list1[j][k] != t[k]:
            count = count + 1
    y.append(count)
print(min(y))
import sys
import math
S = str(input())
T = str(input())
 
 
d = 0
for i,o in enumerate(S):
        j = 0
        c = 0
        for l in S[i:i+len(T)]:
            if l == T[j]:
                c += 1
            j += 1
        d = max(d, c)
        if i > len(S) - len(T) - 1:
            break
print(len(T)-d)
S = input()

T = input()

ans = float("inf")
for i in range(len(S) - len(T)+1):
    tmp = 0
    for j in range(len(T)):
        # print(S[i+j], T[j])
        if S[i+j] != T[j]:
            tmp += 1
    ans = min(tmp, ans)
print(ans)
def get_num(s, t):
    cnt = len(s)
    for i in range(len(s)):
        if s[i] == t[i]:
            cnt -= 1
    return cnt


def main():

    s = input()
    t = input()
    len_s, len_t = len(s), len(t)
    ans = len_t
    for i in range(len_s - len_t + 1):
        new_s = s[i:len(t) + i]
        tmp = get_num(new_s, t)
        ans = min(ans, tmp)

    print(ans)


if __name__ == '__main__':
    main()
S = input()
T = input()

minCount = len(T)
for i in range(len(S)-len(T)+1):
    count = 0
    for j in range(len(T)):
        if S[i+j] != T[j]:
            count += 1
    minCount = min(minCount, count)

print(minCount)
S = input()
T = input()

width = len(T)
predict_word = []
for s_index in range(len(S)):
    if(len(S) < s_index + width):
        break
    predict_word.append(S[s_index:s_index+width])


count_list, ans = [], []
for p_word in predict_word:
    tmp = []
    for count, word in enumerate(p_word):
        if(T[count] == word):
            tmp.append(word)
    count_list.append(tmp)

for count in count_list:
    ans.append(len(count))

print(len(T)-max(ans))
s=list(input())
t=list(input())
ans=[]
for i in range(len(s)-len(t)+1):
  ct=0
  for j in range(len(t)):
    if s[i+j]!=t[j]:
      ct+=1
  ans.append(ct)
print(min(ans))
s=input()
t=input()
m=len(s)
for i in range (len(s)-len(t)+1):
    c=0
    for j in range (len(t)):
        if t[j]!=s[i+j]:
            c+=1
    m=min(m,c)
print(m)
S = input()
T = input()
ans = 1e10
for i in range(len(S)):
    if i+len(T) > len(S):
        break
    cnt = 0
    for j in range(len(T)):
        if S[i+j] != T[j]:
            cnt += 1
    ans = min(cnt, ans)
print(ans)
st1 = input()
st2 = input()
li = []
count = 0

k = 0

for i in range(len(st1)-len(st2)+1):
    for s2 in st2:
        if s2 in st1[i+k]:
            count += 1
        k += 1
    li.append(count)
    count = 0
    k = 0

print(len(st2) - max(li))
import sys

S = input()
T = input()

if len(S) == len(T):
    changeCounter = 0
    for j in range(len(S)):
        if not S[j] == T[j]:
            changeCounter += 1
    print(changeCounter)
    sys.exit()

minChangeCounter = 1000000
for i in range(len(S) - len(T)):
    substr = S[i:i + len(T)]
    changeCounter = 0
    for j in range(len(T)):
        if not substr[j] == T[j]:
            changeCounter += 1
    if changeCounter < minChangeCounter: minChangeCounter = changeCounter
print(minChangeCounter)
s = input().rstrip()
t = input().rstrip()
count = 0
min_count = 10000
for i in range(len(s) - len(t) + 1):
    s_selected = s[i:i + len(t)]
    #print(s_selected)
    count = 0
    for j in range(len(t)):
        if t[j] != s_selected[j]:
            count += 1
    #print(count)
    if count < min_count:
        min_count = count
print(min_count)
S = input()
T = input()
ans = len(T)

for i in range(len(S) - len(T) + 1):
    temp = 0
    for j in range(len(T)):
        if S[i+j] != T[j]:
            temp += 1
    if ans > temp:
        ans = temp

print(ans)
s = input()
t = input()

ans = 0
for i in range(len(s) - len(t) + 1):
    cnt = 0
    for check_t, work in zip(t, s[i:i+len(t)]):
        if check_t == work:
            cnt+=1
    ans = max(ans, cnt)
print(len(t) - ans)
s = str( input() )
t = str( input() )

def compare( s, t ):
    count = 0
    for i in range( len( s ) ):
        if s[ i ] != t[ i ]:
            count += 1
    return count

ans = 10 ** 10
for i in range( len( s ) - len( t ) + 1 ):
    ans_i = compare( s[ i : i + len( t ) ], t )
    if ans_i < ans or i == 0:
        ans = ans_i

print( ans )
s = input()
t = input()

s_len = len(s)
t_len = len(t)
count = 0
c_min = 1000

for i in range(s_len - t_len + 1):
    count = 0
    for j in range(t_len):
        if s[i + j] == t[j]:
            continue
        count += 1
    if c_min > count:
        c_min = count

print(c_min)
s = input()
t = input()
ans = len(t)
for i in range(len(s)-len(t)+1):
    temp = 0
    for j in range(0,len(t)):
        if s[i+j]==t[j]:
            temp += 1
    ans = min(ans,len(t)-temp)
print(ans)
S = input()
T = input()

change_num = 1000000000
count = 0

for i in range(len(S)):
    if (len(T) + i) > len(S):
        break

    s = S[i:len(T) + i]
    for j, k in enumerate(s):
        if k != T[j]:
            count += 1

    if count < change_num:
        change_num = count

    count = 0


print(change_num)
s = input() #sys.stdin.readlineは最後が改行
t = input() #sys.stdin.readlineは最後が改行

ans= 1000

for i in range(len(s)-len(t)+1):
    tmp = 0
    for j in range(len(t)):
        if s[i+j]!=t[j]: tmp+=1

    ans = min(ans,tmp)

print(ans)
if __name__ == '__main__':

    S = list(input())
    T = list(input())

    len_s = len(S)
    len_t = len(T)

    ans = 0
    tmp = 0
    for i in range(len_s-len_t+1):
        A = S[i:i+len_t]
        for j,k in zip(A,T):
            if j == k:
                tmp+=1
        ans = max(ans,tmp)
        tmp = 0
    print(len_t-ans)
def main():
    S = str(input())
    T = str(input())
    counter = 0
    max_match = 0

    if T in S:
        print(0)
    else:
        for i in range(len(T), len(S)+1):
            counter = 0
            for j in range(len(T)):
                if S[i-len(T)+j] == T[j]:
                    counter += 1
            if max_match < counter:
                max_match = counter
        print(len(T)-max_match)
main()
s,(*t,_)=open(0)
print(min(sum(x!=y for x,y in zip(s[i:],t))for i in range(len(s)-len(t))))
a = list(input())
b = list(input())
min_k = len(b)
for i in range(len(a)-len(b)+1):
  c = a[i:i+len(b)]
  count=0
  for k,j in enumerate(c):
    if b[k]==j:
      count+=1
        
  min_k = min(min_k,len(b)-count)

print(min_k)
S = list(input())
T = list(input())

LT = len(T)
same = 0
if len(S) - LT != 0:
    for i in range(len(S) - LT):
        tS = S[i:i+LT]
        tmp = 0
        for j in range(LT):
            if T[j] == tS[j]:
                tmp += 1
        same = max(same,tmp)
    print(LT - same)
else:
    ans = 0
    for i in range(LT):
        if T[i] == S[i]:
            ans += 1
    print(LT - ans)
s=input()
t=input()
ans=float('inf')

for i in range(len(s)-len(t)+1):
  x=s[i:i+len(t)]
  cnt=0
  for j in range(len(t)):
    if x[j]!=t[j]:
      cnt+=1
      
  ans=min(ans,cnt)
  
 
print(ans)
S = input()
T = input()

if S in T:
    print('0')
else:
    count = 0
    for i in range(len(S) - len(T) + 1):
        tmp = 0
        for p in range(len(T)):
            if S[i + p] == T[p]:
                tmp += 1
        
        if count < tmp:
            count = tmp
    
    print(len(T) - count)
S = input()
T = input()

ans = len(T)

for S_start in range(len(S) - len(T) + 1):
    correct = 0
    for i in range(len(T)):
        if T[i] != S[S_start + i]:
            correct += 1
    ans = min(ans, correct)
    #print(ans)

print(ans)
s = input()
s = list(s)
t = input()
t = list(t)

l = []
for i in range(len(s)-len(t)+1) :
    moji = s[i]
    for j in range(len(t)-1) :
        moji += s[i+j+1]
    l.append(moji)
    moji = ""
c = 0
ans = 1000
for i in range(len(l)):
    c = 0
    for j in range(len(t)):
        if l[i][j] != t[j] :
            c += 1
    if ans > c :
        ans = c
print(ans)