#include <bits/stdc++.h>
double PI = 3.14159265358979323846264338327950288419716939937510;
using namespace std;
int MOD = 1E9 + 7;
string getstr() {
  char s[200000];
  scanf("%s", s);
  return s;
}
char gch() {
  int c;
  while ((c = getchar()) <= ' ')
    ;
  return c;
}
template <class A, class B>
void smax(A& a, const B& b) {
  if (a < b) a = b;
}
template <class A, class B>
void smin(A& a, const B& b) {
  if (b < a) a = b;
}
const int N = 2500;
int a[N + 10][N + 10];
int main() {
  int n;
  scanf("%d", &n);
  map<int64_t, int64_t> m;
  m[(int64_t)1E18] = (int64_t)1E18;
  m[0] = 0;
  for (int i = (0); i < (n); ++i) {
    int r, h;
    scanf("%d %d", &r, &h);
    int64_t vol = 1ll * r * r * h;
    auto k = --m.lower_bound(vol);
    int64_t tot = vol + k->second;
    ++k;
    while (k->second <= tot) m.erase(k++);
    m[vol] = tot;
  }
  printf("%.12f", PI * (++m.rbegin())->second);
}
