open Printf open Scanf
open Array

let () = scanf " %d" @@ fun n ->
  let vs = init n (fun _ -> scanf " %d" @@ fun v -> v) in
  let cs = init n (fun _ -> scanf " %d" @@ fun v -> v)
  in
  map2 (fun v c -> max (v-c) 0) vs cs
  |> fold_left (+) 0
  |> print_int
