fun main(args: Array<String>) {
    val n = Integer.parseInt(readLine()) ?: 0
    val vlist = readLine()?.split(" ") ?: listOf()
    val clist = readLine()?.split(" ") ?: listOf()
    var ans = 0
    for(i in 0..n-1) {
      val total = Integer.parseInt(vlist[i] ?: "0") - Integer.parseInt(clist[i] ?: "0")
      if(total > 0) ans += total
    }
    println(ans)
}
