#include <bits/stdc++.h>
using namespace std;
double pi = acos(-1.);
struct node {
  double x, y, r;
  double s;
} q[1010];
double f(node a, node b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) <=
         a.r - b.r;
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> q[i].x >> q[i].y >> q[i].r;
    q[i].s = pi * q[i].r * q[i].r;
  }
  double ans = 0;
  for (int i = 1; i <= n; ++i) {
    int cnt = 0;
    for (int j = 1; j <= n; ++j) {
      if (i == j) continue;
      if (f(q[j], q[i])) cnt++;
    }
    if (cnt % 2 || cnt == 0)
      ans += q[i].s;
    else
      ans -= q[i].s;
  }
  printf("%.15f\n", ans);
}
