import scala.io.{StdIn => in}

object Main extends App {
  val n = in.readInt
  val v = in.readLine.split(" ").map(_.toInt)
  val c = in.readLine.split(" ").map(_.toInt)

  val ans = (0 until n)./:(0)((acc, i) => {
    val res = v(i) - c(i)
    if(res > 0) acc + res else acc
  })
  println(ans)
}