object Main {
  def main(args: Array[String]) = {
    import scala.io.StdIn.readLine

    val n = readLine.toInt
    val v = readLine.split(" ").take(n).map(_.toInt)
    val c = readLine.split(" ").take(n).map(_.toInt)

    val deltas = for {
      i <- (0 until n)
      if (v(i) - c(i) > 0)
    } yield v(i) - c(i)

//    println(deltas.foldLeft(0) { (acc, x) => acc + x })
    println(deltas.sum)
  }
}