"use strict";
function main(input) {
    const args = input.split("\n");
    const Vs = args[1].split(" ");
    const Cs = args[2].split(" ");

    const N = parseInt(args[0]);

    let value = 0;
    let ans = 0;

    for(let i = 0; i < N; i++) {
        value = Vs[i] - Cs[i];
        if(value > 0) {
            ans += value
        }
    }

    console.log(ans);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
