fun main(args:Array<String>){
  var N = readLine()!!.toInt()
  var V = readLine()!!.split(" ").map(String::toInt)
  var C = readLine()!!.split(" ").map(String::toInt)
  var total = 0
  for(i in 0..N-1){
    if(V[i] - C[i]>0){
      total += V[i] - C[i]
    }
  }
  println(total)
}