S = []
S << gets.chomp
T = gets.split(//)
mod_size = []
T_size = T.size
S.each_with_index do |value, index|
  if index+T_size-1 < value.size
    array = S[0].slice(index..index+T_size-1).split(//)
    i = 0
    array.each_with_index do |value_1, index_1|
      if index+T_size-1 < value.size
        p value_1
        p T[index_1]
        if value_1.match?("T[index_1]")
          p 'Yes'
        else
          i += 1 
        end
        mod_size << i
      else
      end
    end
  else
  end
  p mod_size
end 
puts mod_size.max