function Main(input) {
    "use strict";
    const els = input.split('\n');
    const number = els[0];
    const values = els[1].split(' ');
    const costs = els[2].split(' ');
    let sum = 0;

    for (let i = 0; i < number; i++) {
        if(parseInt(values[i],10) >= parseInt(costs[i],10)){
            sum += parseInt(values[i],10) - parseInt(costs[i],10);
        }
    }

    console.log(sum);
}

Main(require('fs').readFileSync('/dev/stdin', 'utf-8'));