#include <iostream>
#include <cmath>

using namespace std;

void unos_niza(double a[],double b[],int n)
{
    for (int i=0;i<n;i++)
        cin >> a[i] >> b[i];
}

void postavljanje_niza(double a[],int n)
{
    for (int i=0;i<n;i++)
        a[i]=0;
}

void razmena(double a,double b)
{
    double tmp;
    tmp=a;
    a=b;
    b=tmp;
}

void sortiranje_niza(double a[],double b[],int n)
{
    int i,j;
    for (i=1;i<n;i++)
        for (j=i;j>0 && a[j-1]>a[j];j--)
        {
            razmena(a[j],a[j-1]);
            razmena(b[j],b[j-1]);
        }
}

void zaokruzivanje(double a[],int n)
{
    for (int i=0;i<n;i++)
        a[i]=ceil(a[i]*100.0)/100.0;
}

double maximum_niza(double a[],int n)
{
    int i;
    double max=a[0];
    for (i=1;i<n;i++)
        if (a[i]>max)
            max=a[i];
    return max;
}

int main()
{
    int n,i,j;
    cin >> n;
    double a[n],p[n];
    unos_niza(a,p,n);
    zaokruzivanje(p,n);
    double novac[n],max;
    postavljanje_niza(novac,n);
    sortiranje_niza(p,a,n);
    for (i=0;i<n;i++)
    {
        if (p[i]>100.0)
            return 0;
        for (j=0;j<n;j++)
            novac[i]+=a[j]*(p[j]/100.0);
    }
    max=maximum_niza(novac,n);
    cout << max << endl;
    return 0;
}