var
n,i,time,now,ans,t,x,y:longint;
p,a,s,r,d:array[0..100000]of longint;
function max(x,y:longint):longint;
begin
if x>y then exit(x);
exit(y);
end;
begin
assign(input,'preparation.in'); reset(input);
assign(output,'preparation.out'); rewrite(output);
readln(n);
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]);
randomize;
ans:=maxlongint;
for i:=1 to n do a[i]:=i;
ans:=maxlongint;
for time:=1 to 20000000 div n do
begin
for i:=1 to n do s[i]:=0;
s[1]:=r[a[1]];
now:=r[a[1]]+p[a[1]];
for i:=2 to n do
begin
s[i]:=max(now,r[a[i]]);
now:=s[i]+p[a[i]];
end;
now:=0;
for i:=1 to n do now:=max(now,s[i]+p[a[i]]-d[a[i]]);
if now<ans then ans:=now;
x:=random(n)+1;
y:=random(n)+1;
t:=a[x];
a[x]:=a[y];
a[y]:=t;
end;
writeln(ans);
close(input);
close(output);
end.