#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    long long int a[n];
    float b[n];
    for(int i=0;i<n;i++)
        cin>>a[i]>>b[i];
    long double k[n];
    for(int i=0;i<n;i++){
        k[i] = 0;
        for(int j=0;j<n;j++){
            if(b[i]<=b[j]){
                k[i] =(double) k[i] + a[j] * b[i];
            }
        }
    }
    int maximum = k[0];
    for(int i=1;i<n;i++)
        if(maximum < k[i])
            maximum = k[i];
    maximum *= 0.1;
    cout<<maximum;
    return 0;
}