function Main(input) {
  "use strict";
	const lines = input.split("\n");
  const n = parseInt(lines[0], 10);
  const vs = lines[1].split(" ").map(s => parseInt(s, 10));
  const cs = lines[2].split(" ").map(s => parseInt(s, 10));
  const diffs = vs.map( (v, i) => v - cs[i]).filter(d => d > 0)
    
  console.log(diffs.reduce((acc, d) => acc + d, 0))
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
