fun main(args: Array<String>) {
    val n = Integer.parseInt(readInputLine())
    val vs = readInputLine().split(" ").map { it -> Integer.parseInt(it) }
    val cs = readInputLine().split(" ").map { it -> Integer.parseInt(it) }
    
    var res = 0
    
    for (i in 0..(n-1)) {
        val value = vs[i] - cs[i]
        if (value > 0) {
            res += value
        }
    }

    println(res)
}
 
fun readInputLine(): String {
    return readLine()!!
}
