parseInput input = map read $ words input :: [Int]

solve :: [(Int, Int)] -> Int
solve [] = 0
solve ((a, b) : xs) = a - b + solve xs

main = do
    n <- readLn :: IO Int
    input <- getLine
    let xs = parseInput input
    line <- getLine
    let ys = parseInput line

    let lst = zip xs ys
    print $ solve (filter(\(x, y) -> (x - y) > 0) lst)
    
    
