object Main {
  def main(args: Array[String]): Unit = {
    val lines = io.Source.stdin.getLines().toSeq
    println(solve(lines))
  }

  def solve(lines: Seq[String]): String = {
    val n = lines.head.toInt
    val values = lines(1).split(" ").take(n).map(_.toInt)
    val costs = lines(2).split(" ").take(n).map(_.toInt)

    var totalValue = 0
    for (i <- values.indices) {
      if (values(i) - costs(i) > 0) totalValue += values(i) - costs(i)
    }
    totalValue.toString
  }
}
