#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1.0);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<pair<long long, long long>> arr(n);
  for (long long i = 0; i < n; i++) {
    cin >> arr[i].first >> arr[i].second;
  }
  map<long long, long long> dp;
  dp[(arr[0].first * arr[0].first * arr[0].second)] =
      (arr[0].first * arr[0].first * arr[0].second);
  for (long long i = 1; i < n; i++) {
    auto it = dp.upper_bound((arr[i].first * arr[i].first * arr[i].second));
    if (it == dp.begin()) {
      dp[(arr[i].first * arr[i].first * arr[i].second)] =
          (arr[i].first * arr[i].first * arr[i].second);
    } else {
      it--;
      if ((*it).first == (arr[i].first * arr[i].first * arr[i].second)) {
        if (it == dp.begin())
          continue;
        else
          it--;
      }
      long long val =
          (arr[i].first * arr[i].first * arr[i].second) + (*it).second;
      vector<long long> todel;
      for (auto j = it; j != dp.end(); j++) {
        if ((*j).first < (arr[i].first * arr[i].first * arr[i].second))
          continue;
        if ((*j).first >= (arr[i].first * arr[i].first * arr[i].second) &&
            (*j).second <= val) {
          todel.push_back((*j).first);
        } else
          break;
      }
      for (auto j : todel) {
        dp.erase(j);
      }
      dp[(arr[i].first * arr[i].first * arr[i].second)] = val;
    }
  }
  long double ans = 0.0;
  for (auto i : dp) {
    ans = max(ans, (long double)i.second);
  }
  cout << fixed << setprecision(10) << pi * ans << endl;
}
