function Main(input) {
    var input = input.split('\n');
  	var jewel = parseInt(input[0], 10);
  	var prices = input[1].split(' ').map(Number);
  	var costs = input[2].split(' ').map(Number);
  	var profit = 0;
  	var maxPro = 0;
  
  	for(var i = 0; i < jewel; i++) {
      profit = prices[i] - costs[i];
      if(profit > 0) {
        maxPro = maxPro + profit;
      }
    }
 
  console.log(maxPro);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));