"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf8");

let lines = [];
var reader = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on("line", line => {
  lines.push(line);
});

reader.on("close", () => {
  const n = parseInt(lines.shift());
  const v = lines.shift().split(/\s/).map(i => parseInt(i));
  const c = lines.shift().split(/\s/).map(i => parseInt(i));
  let ans = 0;
  for (let i = 0; i < n; i++) {
      if (v[i] > c[i]) ans += v[i] - c[i];
  }
  console.log(ans);
});
