import scala.io.StdIn.{readInt, readLine}

object Main extends App {
  val n = readInt()
  val values = readLine().split(' ').map(_.toInt)
  val costs = readLine().split(' ').map(_.toInt)
  
  val result = values.zipWithIndex.foldLeft(0) { case (sum, (value, index)) =>
    val gain = value - costs(index)
    if (gain > 0)
      sum + gain
    else
      sum
  }
  println(result)
}