import java.util.*
import java.math.*;
fun main(args: Array<String>) {

    val N = readLine()!!.toInt()
    //val N = readLine()!!.split("").map{it.toInt()}
    val V = readLine()!!.split(" ").map{it.toInt()}
    val C = readLine()!!.split(" ").map{it.toInt()}
    var ans = 0

    for (i in 0 until N) {
        var vc = V[i]-C[i];
        if (vc > 0) ans += vc
    }

    println(ans)
}
