#include <iostream>
#include <fstream>
using namespace std;
int n,i,j,k,l;
int p[101],r[101],d[101];
int a[101];
bool b[101];
int minhold;
void go(int x);
int main()
{
ifstream fin("preparation.in");
ofstream fout("preparation.out");
fin>>n;
while (n!=0)
{
for (i=1;i<=n;i++)
fin>>p[i];
for (i=1;i<=n;i++)
fin>>r[i];
for (i=1;i<=n;i++)
fin>>d[i];
for (i=1;i<=n;i++)
b[i]=false;
minhold=99999999;
go(1);
fout<<minhold<<endl;
fin>>n;
}
fin.close();
fout.close();
return 0;
}
void go(int x)
{
int i,j,k,l;
if (x==n+1)
{
l=0;
k=0;
for (i=1;i<=n;i++)
{
if (r[a[i]]>l)
l=r[a[i]];
l=l+p[a[i]];
j=l-d[a[i]];
if (j>k)
k=j;
}
if (k<minhold)
minhold=k;
}
else
{
for (i=1;i<=n;i++)
if (!b[i])
{
a[x]=i;
b[i]=true;
go(x+1);
b[i]=false;
a[x]=0;
}
}
}