#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
struct p {
  double x, y;
  double r;
  double s;
} t[maxn], A[maxn];
int a[maxn][maxn];
int in[maxn];
int book[maxn];
double dis(p a, p b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
bool judge(int x, int y) { return t[x].r > dis(t[x], t[y]); }
int main() {
  int n, i, j;
  cin >> n;
  for (i = 1; i <= n; i++) {
    scanf("%lf%lf%lf", &t[i].x, &t[i].y, &t[i].r);
    t[i].s = acos(-1) * t[i].r * t[i].r;
  }
  for (i = 1; i <= n; i++) {
    for (j = i + 1; j <= n; j++) {
      if (t[i].r < t[j].r) {
        if (judge(j, i)) {
          a[j][i] = 1;
          in[i]++;
        }
      } else {
        if (judge(i, j)) {
          a[i][j] = 1;
          in[j]++;
        }
      }
    }
  }
  int k = 0;
  double ans = 0.0;
  for (i = 1; i <= n; i++) {
    if (in[i] == 0) {
      for (j = 1; j <= n; j++) {
        a[i][j] = a[j][i] = 0;
      }
      ans += t[i].s;
    }
  }
  for (i = 1; i <= n; i++) {
    if (in[i] != 0) {
      int num = 0;
      for (j = 1; j <= n; j++) {
        num += a[j][i];
      }
      if (num & 1) {
        ans -= t[i].s;
      } else {
        ans += t[i].s;
      }
    }
  }
  printf("%.9f\n", ans);
}
