#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct Frilenser
{
	double a,p;
};
bool bolji(Frilenser a,Frilenser b)
{
	return a.p<b.p;
}
int main()
{
	int n,i,k;
	long long s=0;
	double mr=0,md=0,r,d;
	cin>>n;
	vector<Frilenser>v(n);
	for(i=0;i<n;i++)
	{
	cin>>v[i].a>>v[i].p;
	
}
    sort(v.begin(),v.end(),bolji);
	for(i=0;i<n;i++)
	s=s+v[i].a;
	for(i=0;i<n;i++)
	{
	
	    r=(s/100)*v[i].p;
	    d=(double)(s%100)*v[i].p/100.0;
	    k=d;
	    r=r+(double)k;
	    d=d-(double)k;
	    if((r>mr) or ((r==mr) && (d>md)))
	    {
	    	mr=r;
	    	md=d;
		}
	    s=s-v[i].a;
	   
	}
	
	int md2=10000*md;
	
	while(md2%10==0 and md2>0)
	md2=md2/10;
	if(md2==0)
	cout<<mr;
	else
	cout<<mr<<"."<<md2;
	return 0;
}