#include <bits/stdc++.h>
using namespace std;
int cond = 0, multi = 0, gcj = 0;
long double pi = 2 * acosl(0);
struct solver {
  void solve() {
    int N;
    cin >> N;
    vector<array<long long, 2> > pkt(N);
    vector<long long> R(N);
    for (auto i = (0); i < (N); ++i) cin >> pkt[i][0] >> pkt[i][1] >> R[i];
    long double res = 0;
    for (auto i = (0); i < (N); ++i) {
      int cnt = 1;
      for (auto j = (0); j < (N); ++j) {
        if (R[i] < R[j]) {
          long long dx = (pkt[i][0] - pkt[j][0]);
          long long dy = (pkt[i][1] - pkt[j][1]);
          if (dx * dx + dy * dy < R[j] * R[j]) cnt++;
        }
      }
      {
        if (cond > 0) {
          cerr << 49 << " "
               << "i << \" \" << cnt"
               << " " << i << " " << cnt << endl;
          cerr.flush();
        }
      };
      long double field = pi * R[i] * R[i];
      if (cnt == 1 || cnt % 2 == 0) {
        res += field;
      } else
        res -= field;
    }
    cout << res << endl;
  }
};
int main(int argc, char** argv) {
  ios::sync_with_stdio(false);
  cond = argc >= 2 && argv[1][0] == 'q' ? 1 << 30 : 0;
  cout.setf(ios::fixed);
  cout.precision(10);
  int t;
  if (multi || gcj)
    cin >> t;
  else
    t = 1;
  for (auto i = (1); i <= (t); ++i) {
    if (cond) cerr << 70 << " " << i << endl;
    if (gcj) cout << "Case #" << i << ": ";
    solver s;
    s.solve();
  }
  return 0;
}
