
function Main(input) {
    var N = parseInt(input[0], 10);
    var V = input.slice(1, 1 + N).map(v => parseInt(v, 10))
    var C = input.slice(1 + N, 2 * N + 1).map(v => parseInt(v, 10))

    // console.log(N);
    // console.log(V);
    // console.log(C);

    var result = 0;

    for (var i = 0; i < N; i++) {
        var value = V[i] - C[i]
        if (value > 0) {
            result += value;
        }
    }
    console.log(result);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));