#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long n;
    cin >> n;
    long long A[n];
    double P[n], zbir=0, sum = 0, mx=1000000, mn=0;
    for(long long i = 0; i < n; i++){
        cin >> A[i] >> P[i];
        zbir +=P[i];}
    zbir = zbir / n;

    for(long long i = 0; i < n; i++){

        if(P[i] >= zbir){
            mx=min(P[i], mx);
            sum += A[i];}}

    printf("%0.10f", sum * mx/100);


}