let () = Scanf.scanf "%d\n" @@ fun n ->
  let vs = Array.init n @@ fun _ -> Scanf.scanf " %d" Fun.id in
  let cs = Array.init n @@ fun _ -> Scanf.scanf " %d" Fun.id in
  let ans = Array.fold_left (fun res i -> res + max 0 (vs.(i) - cs.(i))) 
    0 @@ Array.init n Fun.id in
  Printf.printf "%d\n" ans