import std.stdio, std.conv, std.string, std.math, std.regex, std.range, std.ascii, std.algorithm;

void main(){
	auto N = readln.chomp.to!int;
	auto V = readln.split.to!(int[]);
	auto C = readln.split.to!(int[]);
	int X;
	int Y;

	foreach(i; 0..N){
		if(V[i] > C[i]){
			X += V[i];
			Y += C[i];
		}
	}
	if(X-Y<=0){
		writeln(0);
	}
	else{
		writeln(X-Y);
	}
}