let fold_int f a n =
  let rec fold f a i n =
    if i >= n then
      a
    else
      fold f (f a i) (i + 1) n
  in
    fold f a 0 n

(* O(N) *)
let solve n vs cs =
  fold_int
    (fun res i -> res + max 0 (vs.(i) - cs.(i)))
    0
    n

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

let list_to_array n a xs =
  let res = Array.make n a in
  List.iteri (fun i x -> res.(i) <- x) xs;
  res

let _ =
  let n = read_int () in
  let vs = read_ints () |> list_to_array n 0 in
  let cs = read_ints () |> list_to_array n 0 in
  solve n vs cs |> string_of_int |> print_endline