{-# LANGUAGE BangPatterns #-}
import Control.Arrow
import Control.Monad.Fix
import Data.Foldable
import qualified Data.Vector.Unboxed as VU
import qualified Data.ByteString.Char8 as B
import Debug.Trace

solve :: Int -> VU.Vector Int -> VU.Vector Int -> Int
solve n vn cn = sum $ map (\i -> max 0 $ vn VU.! i - cn VU.! i) [0 .. n - 1]

main = do
  let readInt = fmap (second B.tail) . B.readInt

  n  <- (\vec -> vec VU.! 0) . VU.unfoldrN 1 readInt <$> B.getLine
  vn <- VU.unfoldrN n readInt <$> B.getLine
  cn <- VU.unfoldrN n readInt <$> B.getLine
  print $ solve n vn cn
