#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long BINF = (long long)1e18;
const int N = 100001;
long double r[N], c[N], v[N];
vector<long long> a;
long double fen[N];
int n;
void upd(int T, long double val) {
  for (int i = T; i <= a.size(); i = (i | (i + 1))) {
    fen[i] = max(fen[i], val);
  }
}
long double get(int T) {
  long double ret = 0;
  for (int i = T; i >= 0; i = (i & (i + 1)) - 1) {
    ret = max(ret, fen[i]);
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> r[i] >> c[i];
    v[i] = M_PI * r[i] * c[i] * r[i];
    a.push_back(v[i]);
  }
  sort(a.begin(), a.end());
  a.resize(unique(a.begin(), a.end()) - a.begin());
  long double ans = 0;
  for (int i = 1; i <= n; ++i) {
    int cur = lower_bound(a.begin(), a.end(), v[i]) - a.begin() + 1;
    long double temp = get(cur - 1) + v[i];
    ans = max(ans, temp);
    upd(cur, temp);
  }
  cout << fixed << setprecision(9) << ans;
  return 0;
}
