s = gets.chomp
t = gets.chomp
count = 0
def inc(s,t,i)
  x = 0
  if(s.include?(t[0,t.length - i]))
  elsif(s.include?(t[i,t.length]))
  else
    x += 1
  end
  return x
end

(0...t.length).each{|i|
  count += inc(s,t,i)
}
puts count
