 s = gets.chomp
 t = gets.chomp
 count = 0
 k = s.length
 l = t.length
 
 (0...l).each{|i|
   if(s[0,k - i].include?(t[0,l - i]))
     next
   elsif(s[i,k].include?(t[i,l]))
     next
   else
     count += 1
   end
 }
 
 puts count
