fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val v = readLine()!!.split(" ").map{ it.toInt() }
    val c = readLine()!!.split(" ").map{ it.toInt() }

    (0..n-1).map{ v[it]-c[it] }.filter { it > 0 }.sum().let { println(it) }
}