let N = Int(readLine()!)!
let V = readLine()!.characters.split(" ").map{Int(String($0))!}
let C = readLine()!.characters.split(" ").map{Int(String($0))!}
print((0..<N).reduce(0){max(V[$1.0]-C[$1.0],0)})