#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
const double pi = acos(-1);
long long v[N];
set<pair<long long, long long> > f;
set<pair<long long, long long> >::iterator it1, it2;
int main() {
  int n;
  cin >> n;
  int l, r;
  for (int i = 0; i < n; i++) {
    cin >> r >> l;
    v[i] = 1ll * r * r * l;
  }
  f.insert({0, 0});
  for (int i = 0; i < n; i++) {
    it1 = f.upper_bound({v[i], -1});
    it1--;
    while (1) {
      it2 = f.upper_bound({v[i], -1});
      if (it2 != f.end() && it2->second <= it1->second + v[i]) {
        f.erase(it2);
      } else
        break;
    }
    f.insert({v[i], it1->second + v[i]});
  }
  double ans = f.rbegin()->second * pi;
  printf("%lf\n", ans);
}
