import java.util.Scanner

fun main(args: Array<String>){
    val scanner = Scanner(System.`in`)
    val quantity = scanner.nextInt()
    val result = D0427B(
                    quantity   = quantity // N
                   ,valueArray = Array(quantity){ scanner.nextInt() }
                   ,costArray  = Array(quantity){ scanner.nextInt() }
                 ).judge()
    println(result)
}

class D0427B(
  val quantity: Int
 ,val valueArray: Array<Int>
 ,val costArray:  Array<Int>
){
    val profitabilityArray = Array(quantity){ valueArray[it] - costArray[it] }
    fun judge(): Int{
        return profitabilityArray.filter { it > 0 }.sum()
    }
}