#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,m,temp;
    double s=0,x,smax=0;
    scanf("%d", &n);
    double a[n];
    double b[n];
    double bd[n];
    for(int i=0;i<n;i++)
    {
        scanf("%lf %lf", &a[i],&b[i]);
    }
    for(int o=0;o<n;o++)
    {
        b[o]=bd[o];
    }
    for (int i = 0; i < n; ++i)
        {
            for (int j = i + 1; j < n; ++j)
            {
                if (b[i] > b[j])
                {

                    temp =  b[i];
                    b[i] = b[j];
                    b[j] = temp;

                }
            }
        }
    int p1=b[0]*100;
    int p2=b[n-1]*100;
    for (p1;p1<p2;p1++)
    {
        for(int k=0;k<n;k++)
        {
            if(bd[k]>p1)
            {
                s=s+a[k]*p1/10000;
            }
        }
        if(s>smax)
            s=smax;
    }
    printf("%lf",smax);
    return 0;
}