var stdin = require("fs").readFileSync("/dev/stdin", "utf8");
stdin = stdin.trim().split("\n").reverse();
function input(){return stdin.pop()};
var stdout = [];
function print(x){stdout.push(x)};


var n = parseInt(input());
var v = input().split(" ").map(n=>parseInt(n));
var c = input().split(" ").map(n=>parseInt(n));


var ans = 0;
for (i=0; i < n; i++){
    ans += Math.max(0, v[i]-c[i])
}


print(ans);


stdout = stdout.join("\n");
console.log(stdout);