#include<bits\stdc++.h>

using namespace std;

int main()
{
	double p[200000], r = 0, n, a[200000];
	for(int i = 0; i < n; i++) cin >> a[i] >> p[i];
	for(int i = 0; i < n; i++)
	{
		double t = 0;
		for(int j = 0; j < n; j++) if(p[j] >= p[i]) t += a[i] * p[i];
		if(t > r) r = t;
	}
	cout << r;
}