function main(input) {
  const temp = input.trim().split('\n')

  n = parseInt(temp[0], 10)
  v = temp[1].split(' ').map((n) => parseInt(n, 10))
  c = temp[2].split(' ').map((n) => parseInt(n, 10))

  let answer = 0
  for (let i = 0; i < n; i++) {
    let t = v[i] - c[i]
    if (t > 0) {
      answer += t
    }
  }
  console.log(answer)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))