let _ =
  let n = Scanf.scanf "%d\n" (fun n -> n) in
  let vs = Array.make n 0 in
  let cs = Array.make n 0 in
  let res = ref 0 in
  for i = 0 to n - 1 do
    Scanf.scanf (if i <> n - 1 then "%d " else "%d\n") (fun v -> vs.(i) <- v);
  done;
  for i = 0 to n - 1 do
    Scanf.scanf (if i <> n - 1 then "%d " else "%d\n") (fun c -> cs.(i) <- c);
  done;
  for i = 0 to n - 1 do
    let r = vs.(i) - cs.(i) in
    if r > 0 then res := !res + r;
  done;
  print_int !res