someNumberStr :: String -> String -> Int
someNumberStr [] [] = 0
someNumberStr (x:xs) (y:ys) | x == y = someNumberStr xs ys
                            | otherwise  = 1 + (someNumberStr xs ys) 

main = do
    s <- getLine
    t <- getLine
    print $ someNumberStr s t
