var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
  const val = lines[1].split(" ");
  const cost = lines[2].split(" ");
  const num = Number(lines[0]);
  var gain = 0;
  
  for(i = 0; i < num; i++) {
    gain = (Number(val[i]) - Number(cost[i]) > 0) ? gain + Number(val[i]) - Number(cost[i]) : gain;
  }
  
  console.log(gain);
});