process.stdin.resume();
process.stdin.setEncoding('utf8'); 
var lines = [];
var reader = require('readline').createInterface({
	input: process.stdin,
	output: process.stdout
});
 
reader.on('line', (line) => {
	lines.push(line);
});

reader.on('close', () => {
	"use strict"
	const N = +lines[0];
	const V = lines[1].split(" ").map(Number);
	const C = lines[2].split(" ").map(Number);
	
	let ans = V.reduce((acc, v, i) => acc + (v>C[i] && v-C[i]), 0);
	console.log(ans);
});