#include <bits/stdc++.h>
using namespace std;
long long powmod(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 % MOD);
}
const long long N = 1e5 + 5;
const long long mod = 1e9 + 7;
map<long long, long long> m;
long long bit[N];
void upd(long long i, long long val) {
  for (; i < N; i += i & -i) bit[i] = max(val, bit[i]);
}
long double ask(long long i) {
  long long ans = 0;
  for (; i > 0; i -= i & -i) ans = max(bit[i], ans);
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  vector<pair<long long, long long> > v(n);
  for (long long i = 0; i < n; i++) cin >> v[i].first >> v[i].second;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++)
    a[i] = (v[i].first * v[i].first * v[i].second);
  vector<pair<long long, long long> > temp(n);
  for (long long i = 0; i < n; i++) temp[i] = {a[i], i};
  sort(temp.begin(), temp.end());
  for (long long i = 0; i < n; i++) m[temp[i].first] = i + 1;
  long double ans = 0;
  for (long long i = 0; i < n; i++) {
    long double t = ask(m[a[i]] - 1);
    ans = max(ans, t + a[i]);
    upd(m[a[i]], t + a[i]);
  }
  cout << fixed << setprecision(13) << (long double)3.1415926535 * ans;
  return 0;
}
