program mix;
var
aa,bb:array[0..51] of longint;
cc:array[0..101] of longint;
xx,b,d,low,high:real;
i,j,n,v,a,c:longint;
begin
assign(input,'mix.in');
assign(output,'mix.out');
reset(input);
rewrite(output);
readln(n);
for i:=1 to n do read(aa[i]);
for i:=1 to n do read(bb[i]);
for i:=1 to n do cc[aa[i]]:=cc[aa[i]]+bb[i];
read(v);
for i:=0 to v-1 do begin
a:=a+cc[i];
b:=b+cc[i]*i/100;
end;
for i:=v+1 to 100 do begin
c:=c+cc[i];
d:=d+cc[i]*i/100;
end;
if (a=0) and (c=0) then begin
xx:=cc[v];
write(xx:0:5);
close(input);
close(output);
halt;
end
else
low:=b/a;
high:=d/c;
if a<c then begin
xx:=(100*b-v*a)/(v-100*high);
write((xx+a+cc[v]):0:5);
end
else begin
xx:=(100*d-v*c)/(v-100*low);
write((xx+c+cc[v]):0:5);
end;
close(input);
close(output);
end.