#include <bits/stdc++.h>
const unsigned long long inf = 1LL << 61;
const double eps = 1e-5;
using namespace std;
priority_queue<int, vector<int>, greater<int> > pq;
pair<long long, int> a[101100];
struct node {
  int l, r;
  long long Max;
} nod[101100 * 4];
void push_up(int i) { nod[i].Max = max(nod[i << 1].Max, nod[i << 1 | 1].Max); }
void build(int i, int l, int r) {
  nod[i].l = l;
  nod[i].r = r;
  if (l == r) {
    nod[i].Max = 0;
    return;
  }
  int mid = (l + r) / 2;
  build(i << 1, l, mid);
  build(i << 1 | 1, mid + 1, r);
  push_up(i);
}
void update(int i, int k, long long w) {
  if (nod[i].l == k && nod[i].r == k) {
    nod[i].Max = max(nod[i].Max, w);
    return;
  }
  int mid = (nod[i].l + nod[i].r) / 2;
  if (k <= mid)
    update(i << 1, k, w);
  else
    update(i << 1 | 1, k, w);
  push_up(i);
}
double query(int i, int l, int r) {
  if (nod[i].l == l && nod[i].r == r) {
    return nod[i].Max;
  }
  int mid = (nod[i].l + nod[i].r) / 2;
  if (r <= mid)
    return query(i << 1, l, r);
  else if (l > mid)
    return query(i << 1 | 1, l, r);
  else
    return max(query(i << 1, l, mid), query(i << 1 | 1, mid + 1, r));
}
long long dp[101100];
int main() {
  int n;
  while (cin >> n) {
    long long x, y;
    for (int i = 1; i <= n; i++) {
      scanf("%I64d %I64d", &x, &y);
      a[i].first = x * x * y;
      a[i].second = -i;
    }
    build(1, 1, n);
    sort(a + 1, a + 1 + n);
    for (int i = 1; i <= n; i++) {
      int id = -a[i].second;
      dp[id] = query(1, 1, id) + a[i].first;
      update(1, id, dp[id]);
    }
    printf("%.8lf\n", nod[1].Max * 3.1415926);
  }
  return 0;
}
