fun main(args : Array<String>) {
    val N = readLine()!!.toInt()
    val V = readLine()!!.split(" ").map { it.toInt() }
    val C = readLine()!!.split(" ").map { it.toInt() }

    val diff = mutableListOf<Int>()
    (1..N).forEach {
        diff.add(V[it - 1] - C[it -1])
    }


    val ans = diff.filter {
        it > 0
    }.sum()

    println(ans)
}