fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val vn = readLine()!!.split(" ").map(String::toInt)
    val cn = readLine()!!.split(" ").map(String::toInt)

    var x = 0
    var y = 0
    for (i in 0..(n - 1)) {
        if (vn[i] - cn[i] > 0) {
            x += vn[i]
            y += cn[i]
        }
    }
    println(x - y)
}
