#include<iostream>
#include<iomanip>
using namespace std;
int main(){
    int N,l;
    double ai, pi,suma,resenje;
    cin>>N;
    suma=0;
    for(l=0; l<N; l++)
    {
        cin>>ai>>pi;
        if(pi>=77.32)
        {
            suma=suma+ai;
            
        }















    }
    resenje=suma*0.7732;
    cout<<fixed<<setprecision(4)<<resenje;
    

    













}