#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long int LINF = 0x3f3f3f3f3f3f3f3fll;
const long double pi = acos(-1);
const int MOD = 1e9 + 7;
vector<pair<pair<int, int>, int> > v;
bool ta_dentro(int i, int j) {
  long long int dx = v[i].first.first - v[j].first.first;
  long long int dy = v[i].first.second - v[j].first.second;
  return (dx * dx + dy * dy) <= v[j].second * (long long int)v[j].second;
}
const int N = 1010;
bool compare(const pair<pair<int, int>, int> &a,
             const pair<pair<int, int>, int> &b) {
  if (b.second != a.second) return a.second < b.second;
  return a < b;
}
int us[N], deg[N], n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x, y, r;
    scanf("%d%d%d", &x, &y, &r);
    v.push_back(make_pair(make_pair(x, y), r));
  }
  sort(v.begin(), v.end(), compare);
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      if (ta_dentro(i, j)) deg[i]++;
  long long int area = 0;
  for (int i = 0; i < n; i++)
    if (deg[i] == 0 or deg[i] % 2)
      area += v[i].second * (long long int)v[i].second;
    else
      area -= v[i].second * (long long int)v[i].second;
  cout << fixed << setprecision(15);
  long double x = area * pi;
  cout << x << endl;
  return 0;
}
