import scala.io.StdIn._

object MainB {
  def main(args: Array[String]) = {
    val n = readLine.toInt
    val vs = readLine.split(" ").map(_.toInt)
    val cs = readLine.split(" ").map(_.toInt)

    println(vs.zip(cs).map { case (v, c) => Math.max(v - c, 0) }.sum)
  }
}