function Main(input) {
    var result;
    const N = parseInt(input.shift())
    const Vs = input.slice(0, N).map(x => parseInt(x));
    const Cs = input.slice(N).map(x => parseInt(x));

    var result = 0;
    for (var index = 0; index < Vs.length; index++) {
        var value = Vs[index] - Cs[index];
        if (value > 0) {
            result += value;
        }
    }
    console.log(result);
}

// 1行入力の場合
// Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());

// 改行で分割
// Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n/));

// 改行・空白で分割
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));