#include <bits/stdc++.h>
const long double PI = 3.1415926535897932384626434;
using namespace std;
const long long MX = 100000;
const long long MOD = 1000000007;
long long fast_exp(long long base, long long exp, long long mod) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % mod;
    base = (base * base) % mod;
    exp /= 2;
  }
  return res;
}
map<long long, long long> F;
void upd(long long x, long long y) {
  for (; x; x += x & -x) F[x] = max(F[x], y);
}
long long q(long long x) {
  long long ans = 0;
  for (; x; x -= x & -x) ans = max(F[x], ans);
  return ans;
}
int main() {
  int n;
  cin >> n;
  long long N = (long long)(1e12) + 10;
  vector<pair<long long, long long> > v(n + 1);
  for (int i = 1; i <= n; i++) cin >> v[i].first >> v[i].second;
  long long res = 0;
  for (int i = 1; i <= n; i++) {
    long long tot = q(v[i].first * v[i].first * v[i].second - 1);
    upd(v[i].first * v[i].first * v[i].second,
        tot + v[i].first * v[i].first * v[i].second);
  }
  cout << setprecision(10) << fixed << acos(-1) * q(N) << "\n";
  return 0;
}
