#include <bits/stdc++.h>
using namespace std;
long long int n;
vector<pair<long long int, long long int> > A;
vector<long long int> DP, X;
vector<long long int> BIT;
map<long long int, long long int> compress;
inline long long int vol(long long int x) {
  return A[x].first * A[x].first * A[x].second;
}
long long int RMQ(long long int idx) {
  long long int res = 0;
  while (idx) {
    res = max(res, BIT[idx]);
    idx -= (idx & -idx);
  }
  return res;
}
void upd(long long int idx, long long int v) {
  while (idx <= n) {
    BIT[idx] = max(BIT[idx], v);
    idx += (idx & -idx);
  }
}
int main(void) {
  long long int v;
  cin >> n;
  A.clear();
  A.resize(n);
  X.clear();
  X.resize(n);
  DP.clear();
  DP.resize(n + 1, 0);
  BIT.clear();
  BIT.resize(4 * (n + 1), 0);
  for (long long int i = 0; i < n; i++) {
    cin >> A[i].first >> A[i].second;
    X[i] = vol(i);
  }
  sort(X.begin(), X.end());
  for (long long int i = 0; i < n; i++) compress[X[i]] = i + 1;
  long long int res = 0;
  for (long long int i = 0; i < n; i++) {
    v = compress[vol(i)];
    DP[v] = vol(i) + RMQ(v - 1);
    upd(v, DP[v]);
    res = max(res, DP[v]);
  }
  printf("%.10f\n", double(res) * 3.14159265358979323846);
}
