main :: IO ()
main = do
  s <- getLine
  t <- getLine
  print $ solve s t

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