#include<iostream>
#include<cmath>
using namespace std;
int main(){
	unsigned N; double A[20000],P[20000],profit,max=0; int i;
	cin>>N;
	for(i=0;i<N;i++){
		cin>>A[i];
		cin>>P[i];
	}
	for(i=0;i<N;i++){
		profit=0;
		for(int j=0;j<N;j++){
			if(P[j]>=P[i])profit+=A[j]*round(P[i]*100)/100;
			if(profit>max)max=profit;
		}
	}
	cout<<max;
	return 0;
}