#include <iostream>
#include <math.h>
#include <bits/stdc++.h>

using namespace std;

int main(){
    int n;
    do{
        cin >> n;
    }while(n < 1 || n > 200000);
    long long frilenser[n];
    double zarada[n];
    double porez[n];
    for(int i = 0; i < n;i++){
        do{
            cin >> zarada[i];
        }while(zarada[i] < 1 || zarada[i] > 1000000);
        do{
            cin >> porez[i];
        }while(porez[i] < 0 || porez[i] > 100);
    }

    double mini = 100;
    double pom= 0;
    double a;
    double niz[n];


    for(int i = 0;i < n;i++){
        niz[i] = porez[i];
    }
    int b = sizeof(niz) / sizeof(niz[0]);
    sort(niz, niz + b);
    for(int i = 0;i < n;i++){
        if(i == (n/2)){
            a = niz[i];
        }
    }
    for(int i = 0;i < n;i++){
        if(porez[i] == a){
            mini = porez[i];
        }
    }

    double suma = 0;
    for(int i = 0;i < n;i++){
        if(mini <= porez[i]){
            suma += zarada[i];
        }
    }
    cout << suma * (mini/100);
    return 0;
}