object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N = sc.nextInt
  val X = new Array[Int](N)
  val Y = new Array[Int](N)
  for (i <- 0 until N)
    X(i) = sc.nextInt
  for (i <- 0 until N)
    Y(i) = sc.nextInt
  println((0 until N).map(i => X(i) - Y(i)).filter(_ > 0).sum)
}