'use strict'
function main(input) {
  input = input.split('\n')
  const value = input[1].split(' ')
  const cost = input[2].split(' ')
  let result = 0
  value.forEach((val, i) => {
    const temp = Number(val) - Number(cost[i])
    if (temp > 0) result += temp
  })
  console.log(result)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
