#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323846264338327950288419716939937510;
long long n;
static long long val[131073];
void update(long long l, long long x) {
  while (l <= 131072) {
    val[l] = max(val[l], x);
    l += l & -l;
  }
}
long long findmax(long long l) {
  long long res = 0;
  while (l > 0) {
    res = max(res, val[l]);
    l -= l & -l;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  pair<long long, long long> volume[n];
  for (long long i = 0; i < n; i++) {
    long long rad, h;
    cin >> rad >> h;
    volume[i].first = rad * rad * h;
    volume[i].second = -(i + 1);
  }
  sort(volume, volume + n);
  long long res = 0;
  long long found[n];
  for (long long i = 0; i < n; i++) {
    found[i] = findmax(-volume[i].second);
    found[i] += volume[i].first;
    res = max(res, found[i]);
    update(-volume[i].second, found[i]);
  }
  double print = res;
  print *= pi;
  cout << fixed << print;
  return 0;
}
