#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
   unsigned short int n;cin>>n;
   unsigned int a[n],v=0; double b[n],m=0;
   for(int i=0;i<n;i++)
   {
       cin>>a[i]>>b[i];
       if(b[i]>70.00)
       {
          v+=a[i];
          if(b[i]>70.00 && b[i]<80.00)
          {
              m=b[i]*1.0000;
          }
       }
   }
    double q=v*1.0000*m*1.0000/100.0000;
    printf("%4.f",q);

    return 0;
}