import Control.Monad (replicateM)

main :: IO ()
main = do
    getLine
    [vs,cs] <- replicateM 2 getInts
    print $ solve vs cs

getInts :: IO [Int]
getInts = map read . words <$> getLine

solve :: [Int] -> [Int] -> Int
solve = sum .: filter (0<) .: zipWith (-)

infixr 9 .:
(.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
(f .: g) x y = f (g x y)
