#include <bits/stdc++.h>
using namespace std;
unsigned long long nextULL() {
  unsigned long long sum = 0;
  char a;
  while (true) {
    a = getchar();
    if (a < '0' || a > '9') return sum;
    sum = sum * 10 + (unsigned long long)(a - '0');
  }
}
const int max_n = 100500;
long double v[max_n], dp[max_n], ans;
int n, ind[max_n], r_ind[max_n];
bool comp(int a, int b) { return v[a] < v[b]; }
void update(int r, long double nv) {
  for (; r < n; r = r | (r + 1)) dp[r] = max(dp[r], nv);
}
long double get_max(int r) {
  long double result = 0;
  for (; r >= 0; r = (r & (r + 1)) - 1) result = max(dp[r], result);
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    long double r, h;
    cin >> r >> h;
    v[i] = h * r * r;
    ind[i] = i;
  }
  sort(ind, ind + n, comp);
  for (int i = 0; i < n; i++) r_ind[ind[i]] = i;
  for (int i = 0; i < n; i++) {
    int l = 0, r = n - 1, mid, b = -1;
    while (l <= r) {
      mid = (l + r) / 2;
      if (v[ind[mid]] < v[i]) {
        l = mid + 1;
        b = mid;
      } else
        r = mid - 1;
    }
    long double t = v[i] + get_max(b);
    update(r_ind[i], t);
  }
  cout.setf(ios_base::floatfield, ios_base::fixed);
  cout.precision(9);
  cout << get_max(n - 1) * 3.14159265358979;
  return 0;
}
