import scala.io.StdIn

object Main {

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

        println((0 until n).map(i => List(vs(i) - cs(i), 0).max).sum)
    }
}