open List
open Str
open Printf

let solve n vs cs = combine vs cs
    |> map (fun (v, c) -> v - c)
    |> filter (fun x -> x > 0)
    |> fold_left ( + ) 0

let read_ints () = read_line ()
    |> split (regexp " ")
    |> map int_of_string

let () = begin
    let n = read_line () |> int_of_string in
    let vs = read_ints () in
    let cs = read_ints () in
    solve n vs cs |> printf "%d\n"
end