ans [] [] = 0
ans (v:vs) (c:cs)
  | v > c = v - c + ans vs cs
  | otherwise = ans vs cs



main = do
  n <- read <$> getLine :: IO Int
  vs <- (map read . words) <$> getLine :: IO [Int]
  cs <- (map read . words) <$> getLine
  putStrLn $ show $ ans vs cs

