object Main extends App {
  val inputs: Seq[String] = io.Source.stdin.getLines().toList
  val N      = inputs(0).toInt
  val values = inputs(1).split(" ").map(_.toInt).toIndexedSeq
  val costs  = inputs(2).split(" ").map(_.toInt).toIndexedSeq

  println(solve(N, values, costs))

  def solve(N: Int, values: IndexedSeq[Int], consts: IndexedSeq[Int]): Int = {
    var result = 0
    values.zipWithIndex.foreach { case (value, index) =>
        val cost = consts(index)
      (value - cost) match {
        case gain if 0 < gain => result = result + gain
        case _                => result = result + 0
      }
    }
    result
  }
}