#include <bits/stdc++.h>
using namespace std;
struct cir {
  long double x, y, r;
};
cir a[1005];
int num[1005];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].x >> a[i].y >> a[i].r;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      long double d = (a[i].x - a[j].x) * (a[i].x - a[j].x) +
                      ((a[i].y - a[j].y) * (a[i].y - a[j].y));
      long double R = (a[i].r + a[j].r) * (a[i].r + a[j].r);
      if (d < R && a[i].r < a[j].r) num[i]++;
    }
  long double pi = acos(-1);
  long double A = 0.0000000, B = 0.00000000;
  for (int i = 0; i < n; i++) {
    if (num[i] == 0 || num[i] % 2 == 1) {
      A += pi * a[i].r * a[i].r;
    } else {
      B += pi * a[i].r * a[i].r;
    }
  }
  cout << setprecision(10) << fixed << A - B << endl;
  return 0;
}
