function 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).reduce((x,y)=>x+y);
    // console.log(ans);
    var x=sub.filter(value=>value>=0);
    // console.log(x);
    
    console.log(x.length?x.reduce((x,y)=>x-y):0);
    
};
Main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));
