#include <bits/stdc++.h>
using namespace std;
long long Pow(long long a, long long b, long long MOD) {
  a %= MOD;
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % MOD;
    b /= 2;
    a = (a * a) % MOD;
  }
  return res;
}
const int maxn = 200000 + 10;
const int MOD = 1e9 + 7;
int cnt[maxn];
struct Node {
  double x, y, r, ar;
} s[maxn];
double dis(int i, int j) {
  return sqrt((s[i].x - s[j].x) * (s[i].x - s[j].x) +
              (s[i].y - s[j].y) * (s[i].y - s[j].y));
}
int main() {
  int i, j, n;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%lf%lf%lf", &s[i].x, &s[i].y, &s[i].r);
    s[i].ar = s[i].r * s[i].r * acos(-1.0);
  }
  memset(cnt, 0, sizeof(cnt));
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      if (i == j) continue;
      if (dis(i, j) < s[i].r && s[i].r > s[j].r) {
        cnt[j]++;
      }
    }
  }
  double res = 0;
  for (i = 1; i <= n; i++) {
    if (cnt[i] == 0)
      res += s[i].ar;
    else if (cnt[i] & 1)
      res += s[i].ar;
    else
      res -= s[i].ar;
  }
  printf("%.8f\n", res);
  return 0;
}
