function main(arg) {
	arg = arg.trim().split("\n")
	var N = Number(arg[0])
	var v = arg[1].split(" ").map(Number)
	var c = arg[2].split(" ").map(Number)
	var result = 0
	for (var i = 0;i < v.length; i ++) {
		var t = v[i] - c[i]
		if (t >= 0) {
			result += t
		}
	}
	console.log(result)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));