#include <iostream>
#include<algorithm> 
#include <string>
#include <cmath>
#include <iomanip>
using namespace std;

double A[200001];
double P[200001];

int main()
{
    int i;
    double prosek, zbir = 0, minimalan = 100, zbirresenje = 0, n, resenje;

    cin >> n;

    for (i = 0; i < n; i++)
    {
        cin >> A[i] >> P[i];
    }

    for (i = 0; i < n; i++)
    {
        zbir += P[i];
    }
    prosek = zbir / n;

    for (i = 0; i < n; i++)
    {
        if (P[i] > prosek)
        {
            if (P[i] < minimalan)
            {
                minimalan = P[i];
            }
        }
    }

    for (i = 0; i < n; i++)
    {
        if (P[i] > prosek)
        {
            zbirresenje += A[i];
        }
    }
    resenje = zbirresenje * minimalan / 100;

    cout << setprecision(10) << resenje << endl;
}