'use strict'
const convertNum = num => Number(num)
const Main = input => {
  const values = input[1].split(' ').map(convertNum)
  const costs = input[2].split(' ').map(convertNum)
  let result = 0
  values.forEach((value, idx) => {
    if (value > costs[idx]) {
      result = result + (value - costs[idx])
    }
  })
  console.log(result)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n/))