Main = input => {
    N = input[0];
    V = input[1].split(' ');
    S = input[2].split(' ');
    // console.log(N);
    // console.log(V);
    // console.log(S);
    var sub = new Array(N);
    for(let i = 0; i < N; i++) sub[i] = V[i]-S[i];
    // console.log(sub);
    var ans=sub.filter(value=>value>=0)
    const reducer = (x, y) => x - y;
    console.log(ans.reduce(reducer));
};
Main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));
