#include <bits/stdc++.h>

using namespace std;

int main(){

    int broj_f;
    cin >> broj_f;

    vector<pair<double, double>> frilenseri;

    for(int i = 0; i < broj_f; i++){
        double Ai;
        double Pi;
        cin >> Ai >> Pi;
        pair<double, double> novac_procent = make_pair(Pi, Ai);

        frilenseri.push_back(novac_procent);
    }

    sort(frilenseri.begin(), frilenseri.end());

    double ukupno = 0;
    vector<double> u_s;

    for(auto it : frilenseri){
        ukupno += it.second;
    }

    for(auto it : frilenseri){
        double rez = ukupno * it.first / 100;
        ukupno -= it.second;
        u_s.push_back(rez);
    }

    double prev = u_s.at(0);

    for(auto it : u_s){
        if (it > prev){
            prev = it;
        }
    }

    if(ceil(prev) - prev == abs(floor(prev) - prev)){
        cout << ceil(prev);
    }else{
        cout << setprecision(4) << fixed  << prev;
    }


    return 0;
}