program mix;
const
maxn = 50;
var
n: longint;
cy: extended;
tmp,ans,sum: extended;
A,B,c: array[1..maxn] of extended;
procedure init;
var
i: longint;
begin
readln(n);
for i :=1 to n do read(A[i]);
for i :=1 to n do A[i] :=A[i]/100;
for i :=1 to n do read(B[i]);
readln(cy); cy :=cy/100;
end;
procedure sort;
var
temp: extended;
i,j: longint;
begin
for i :=1 to n-1 do
for j :=i+1 to n do
if c[i] <c[j] then begin
temp :=c[i]; c[i] :=c[j]; c[j] :=temp;
end;
end;
procedure main;
var
i: longint;
temp: extended;
begin
for i :=1 to n do c[i] :=cy-A[i];
for i :=1 to n do tmp :=tmp + c[i]*B[i];
for i :=1 to n do sum :=sum + B[i];
if tmp = 0
then ans :=sum
else begin
sort; ans :=sum;
if tmp >0
then begin
for i :=1 to n do begin
if tmp - c[i]*B[i] <=0 then begin
ans :=ans - tmp/c[i]; break;
end;
tmp :=tmp - c[i] *B[i];
ans :=ans - B[i];
end;
end
else begin
for i :=1 to n shr 1 do begin
temp :=c[i]; c[i] :=c[n-i+1]; c[n-i+1] :=temp;
end;
for i :=1 to n do begin
if tmp - c[i]*B[i] >=0 then begin
ans :=ans - tmp/c[i]; break;
end;
tmp :=tmp - c[i]*B[i];
ans :=ans - B[i];
end;
end;
end;
writeln(ans:0:5);
end;
begin
assign(input,'mix.in'); reset(input);
assign(output,'mix.out'); rewrite(output);
init;
main;
close(input); close(output);
end.