import Control.Applicative ((<$>))
import Data.Int (Int64)


computeMax :: Integral a => [a] -> [a] -> a
computeMax cs vs = sum $ filter (> 0) $ zipWith (-) cs vs


main :: IO ()
main = do
    _ <- getLine
    vs <- fmap read . words <$> getLine :: IO [Int64]
    cs <- fmap read . words <$> getLine :: IO [Int64]
    print $ computeMax vs cs