var
f:array[0..100]of boolean;
p,r,d:array[0..100]of longint;
n,i,j,min,now,ans:longint;
procedure dfs(x:longint);
var
n0,m0,i:longint;
begin
if x>n then begin
if min<ans then ans:=min;
end
else begin
n0:=now;m0:=min;
for i:=1 to n do
if not f[i] then begin
if r[i]>now then begin
if ans<r[i]+p[i]-d[i] then exit;
end
else begin
if ans<now+p[i]-d[i] then exit;
end;
end;
for i:=1 to n do
if not f[i] then begin
f[i]:=true;
if r[i]>now then now:=r[i];
now:=now+p[i];
if min<now-d[i] then min:=now-d[i];
dfs(x+1);
min:=m0;now:=n0;f[i]:=false;
end;
end;
end;
begin
assign(input,'preparation.in');reset(input);
assign(output,'preparation.out');rewrite(output);
repeat
read(n); ans:=200000000;min:=-20000000;
if n=0 then break;
for i:=1 to n do read(p[i]);
for i:=1 to n do read(r[i]);
for i:=1 to n do read(d[i]);
dfs(1);
writeln(ans);
until n=0;
close(input);close(output);
end.