import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

int calc(int[] vs, int[] cs) {
    int ans = 0;
    foreach (v, c; vs.zip(cs)) {
        if (v > c) ans += v - c;
    }
    return ans;
}

void main() {
    readint;
    auto vs = readints;
    auto cs = readints;
    writeln(calc(vs, cs));
}
