main=do
    line1<-getLine
    let forecast=line1
    line2<-getLine
    let realWeather=line2
    print $ score $ zip forecast realWeather
score :: [(Char,Char)]->Int
score [] = 0
score (x:xs) 
    | fst x == snd x = 1 + score xs
    | otherwise = score xs
