import scala.io.StdIn

object Main extends App {
  val n  = StdIn.readLine().toInt
  val x  = StdIn.readLine().split(" ").map(_.toInt)
  val y  = StdIn.readLine().split(" ").map(_.toInt)  

  def solve(x: Array[Int], y: Array[Int]): Int = {
    val a = x zip y
    a.map{ v =>
      v._1 - v._2
    }.filter(_ > 0).sum
  }
  println(solve(x, y))

}
  


