open System

let N=stdin.ReadLine()|>int
let V=stdin.ReadLine().Split()|>Array.map int
let C=stdin.ReadLine().Split()|>Array.map int
[<EntryPoint>]
let main argv =
    [for i in [0..N-1] do yield (V.[i]-C.[i])]
    |>Seq.sumBy(fun c -> if c>0 then c else 0)
    |>stdout.WriteLine
    0