import scala.io.StdIn._

object Main extends App {
  val N = readLine.toInt
  val V = readLine.split(' ').map(s => s.toInt)
  val C = readLine.split(' ').map(s => s.toInt)

  var result = 0
  (0 until N).foreach(i => {
    val diff = V(i) - C(i)
    if (diff > 0) {
      result += diff
    }
  })
  println(result)
}