#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int N;
  cin >> N;
  unsigned long long r;
  unsigned long long h;
  map<unsigned long long, unsigned long long> memo;
  memo[0] = 0;
  for (int i = 0; i < N; ++i) {
    cin >> r >> h;
    auto V = r * r * h;
    auto upperBound = memo.lower_bound(V);
    auto bestTopping = upperBound;
    bestTopping--;
    auto Vt = V + bestTopping->second;
    for (; upperBound != memo.end() && (upperBound->second <= Vt);
         upperBound = memo.erase(upperBound)) {
    }
    memo[V] = Vt;
  }
  cout << setprecision(12) << ((double)((--memo.end())->second)) * 3.1415926
       << "\n";
  return 0;
}
