#include <bits/stdc++.h>
using namespace std;
int N;
long long st[4 * (long long)1e5 + 3];
pair<long long, int> v[(long long)1e5 + 3];
map<long long, int> mp;
void add(int l, int r, int p, int i, int j, long long val) {
  if (i > r || j < l) return;
  if (i <= l && j >= r) {
    st[p] = val;
    return;
  }
  int mid = (l + r) >> 1, p1 = p << 1, p2 = p << 1 | 1;
  add(l, mid, p1, i, j, val);
  add(mid + 1, r, p2, i, j, val);
  st[p] = max(st[p1], st[p2]);
}
long long query(int l, int r, int p, int i, int j) {
  if (i > r || j < l) return 0;
  if (i <= l && j >= r) return st[p];
  int mid = (l + r) >> 1, p1 = p << 1, p2 = p << 1 | 1;
  long long q1 = query(l, mid, p1, i, j);
  long long q2 = query(mid + 1, r, p2, i, j);
  return max(q1, q2);
}
bool comp(pair<long long, int> &p1, pair<long long, int> &p2) {
  if (p1.first == p2.first) return p1.second > p2.second;
  return p1.first < p2.first;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> N;
  for (int i = 0; i < N; i++) {
    long long x, y;
    cin >> x >> y;
    v[i].first = x * x * y;
    v[i].second = i;
  }
  sort(v, v + N, comp);
  for (int i = 0; i < N; i++)
    add(0, N - 1, 1, v[i].second, v[i].second,
        v[i].first + query(0, N - 1, 1, 0, v[i].second));
  cout << fixed << setprecision(10);
  cout << st[1] * 3.141592654;
  return 0;
}
