let map2 f a b =
  let l = Array.length a in
  let r = Array.make l (f a.(0) b.(0)) in
  for i = 1 to l - 1 do
    r.(i) <- f a.(i) b.(i)
  done;
  r

let () = Scanf.scanf "%d\n" @@ fun n ->
    let v = Array.init n (fun _ -> Scanf.scanf "%d " (fun v -> v)) in
    let c = Array.init n (fun _ -> Scanf.scanf "%d " (fun v -> v)) in
    Printf.printf "%d" (map2 (fun v c -> max (v - c) 0) v c |> Array.fold_left (+) 0)
