{
Written by Fyodor Menshikov 10.02.2004
22:23-22:37, debugged by 22:48, used blocks counting by 22:57
buggy blocks counting removed at 23:15
Money spent output removed 12.02.2004 12:13
}
{ $R+,Q+}
{$N+,E-}
type
   real=extended;

   function pow(p,k:real):real;
   begin
      if p=1 then
         pow:=1
      else
         pow:=1-exp(ln(1-p)*k);
   end;

var
   n,i,si,k:integer;
   p:array[1..100]of real;
   s:array[1..100]of integer;
   ss,cost:integer;
   best,newbest:array[0..1000]of real;
   mult,max:real;
begin
//   assign(input,'input.txt');
   reset(input);
//   assign(output,'output.txt');
   rewrite(output);
   readln(n);
   for i:=1 to n do
      readln(p[i],s[i]);
   readln(ss);
   best[0]:=1;
   for i:=1 to n do
      best[0]:=best[0]*p[i];
   for si:=1 to ss do
      best[si]:=0;
   newbest:=best;
   for i:=1 to n do begin
      k:=2;
      cost:=s[i];
      while cost<=ss do begin
         mult:=pow(p[i],k)/p[i];
         for si:=cost to ss do
            if best[si-cost]*mult>newbest[si] then begin 
               newbest[si]:=best[si-cost]*mult;
            end;
         inc(k);
         inc(cost,s[i]);
      end;
      best:=newbest;
   end;
   max:=best[0];
   for si:=0 to ss do
      if best[si]>max then
         max:=best[si];
   writeln(max:0:5);
end.