import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val n = sc.next.toInt
    val vs = (1 to n).map(x => sc.next.toInt)
    val cs = (1 to n).map(x => sc.next.toInt)
    val d: Seq[Int] = vs zip cs map { case (v, c) => v - c }
    println(d.filter(_ >= 0).sum)

  }
}