#include <bits/stdc++.h>
using namespace std;
static const int INF = 0x3f3f3f3f;
static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
template <typename T, typename U>
static void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
static void amax(T &x, U y) {
  if (x < y) x = y;
}
struct Disk {
  int x, y, r;
  int i;
};
int main() {
  int n;
  while (~scanf("%d", &n)) {
    vector<Disk> disks(n + 1);
    for (int(i) = 0; (i) < (int)(n); ++(i)) {
      int x;
      int y;
      int r;
      scanf("%d%d%d", &x, &y, &r);
      disks[i] = {x, y, r, i};
    }
    disks[n] = {0, 0, (int)1e7, -1};
    sort(disks.begin(), disks.end(), [](Disk a, Disk b) { return a.r > b.r; });
    auto sq = [](int x) { return (long long)x * x; };
    vector<vector<int> > g(n + 1);
    for (int(i) = 0; (i) < (int)(n + 1); ++(i)) {
      for (int j = i - 1; j >= 0; --j) {
        auto a = disks[i], b = disks[j];
        if (sq(a.x - b.x) + sq(a.y - b.y) <= sq(b.r)) {
          g[j].push_back(i);
          break;
        }
      }
    }
    vector<long long> memo((n + 1) * 4, -INFL);
    function<long long(int, int, int, int)> rec = [&](int i, int j, int p,
                                                      int q) -> long long {
      if (j == g[i].size()) return 0;
      int c = g[i][j];
      long long &r = memo[c * 4 + p * 2 + q];
      if (r != -INFL) return r;
      amax(r, rec(c, 0, p ^ 1, q) + (p == 0 ? 1 : -1) * sq(disks[c].r) +
                  rec(i, j + 1, p, q));
      amax(r, rec(c, 0, p, q ^ 1) + (q == 0 ? 1 : -1) * sq(disks[c].r) +
                  rec(i, j + 1, p, q));
      return r;
    };
    double ans = (double)rec(0, 0, 0, 0);
    ans *= acos(-1.);
    printf("%.10f\n", ans);
  }
  return 0;
}
