#include <bits/stdc++.h>
using namespace std;
long long P = 1e9 + 7;
double PI = 3.141592653589793;
const int sqr = 500;
const int arrn = 4e6 + 5;
const int arrn2 = 6e3 + 5;
void solve() {
  int n;
  cin >> n;
  vector<long long> in(n);
  for (int i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    in[i] = a * a * b;
  }
  map<long long, long long> cos;
  cos[0] = 0;
  double out = 0;
  for (auto i : in) {
    auto it = cos.lower_bound(i);
    it--;
    cos[i] = max(cos[i], it->second + i);
    it = cos.upper_bound(i);
    while (it != cos.end()) {
      if (it->second < cos[i]) {
        cos.erase(it->first);
      } else
        break;
      it = cos.upper_bound(i);
    }
    out = max(out, (double)cos[i]);
  }
  out = PI * out;
  cout << fixed << setprecision(10) << out;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
