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

    val profits = valueList
        .mapIndexed { index, i -> i - cList[index] }
        .filter { i -> i > 0 }
        .sum()

    println(profits)
}
