Problem: The crowdedness of the discotheque would never stop our friends from having fun, but a bit more spaciousness won't hurt, will it?

The discotheque can be seen as an infinite xy-plane, in which there are a total of n dancers. Once someone starts moving around, they will move only inside their own movement range, which is a circular area Ci described by a center (xi, yi) and a radius ri. No two ranges' borders have more than one common point, that is for every pair (i, j) (1 ≤ i < j ≤ n) either ranges Ci and Cj are disjoint, or one of them is a subset of the other. Note that it's possible that two ranges' borders share a single common point, but no two dancers have exactly the same ranges.

Tsukihi, being one of them, defines the spaciousness to be the area covered by an odd number of movement ranges of dancers who are moving. An example is shown below, with shaded regions representing the spaciousness if everyone moves at the same time.

<image>

But no one keeps moving for the whole night after all, so the whole night's time is divided into two halves — before midnight and after midnight. Every dancer moves around in one half, while sitting down with friends in the other. The spaciousness of two halves are calculated separately and their sum should, of course, be as large as possible. The following figure shows an optimal solution to the example above.

<image>

By different plans of who dances in the first half and who does in the other, different sums of spaciousness over two halves are achieved. You are to find the largest achievable value of this sum.

Input

The first line of input contains a positive integer n (1 ≤ n ≤ 1 000) — the number of dancers.

The following n lines each describes a dancer: the i-th line among them contains three space-separated integers xi, yi and ri ( - 106 ≤ xi, yi ≤ 106, 1 ≤ ri ≤ 106), describing a circular movement range centered at (xi, yi) with radius ri.

Output

Output one decimal number — the largest achievable sum of spaciousness over two halves of the night.

The output is considered correct if it has a relative or absolute error of at most 10 - 9. Formally, let your answer be a, and the jury's answer be b. Your answer is considered correct if <image>.

Examples

Input

5
2 1 6
0 4 1
2 -1 3
1 -2 1
4 -1 1


Output

138.23007676


Input

8
0 0 1
0 0 2
0 0 3
0 0 4
0 0 5
0 0 6
0 0 7
0 0 8


Output

289.02652413

Note

The first sample corresponds to the illustrations in the legend.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int INF = 1000 * 1000 * 1000 + 322;
const long long LLINF =
    2LL * 1000LL * 1000LL * 1000LL * 1000LL * 1000LL * 1000LL;
const long long MOD = 1000 * 1000 * 1000 + 7;
const int RMOD = MOD - 2;
const int N = 100 * 1000 + 10;
const int P1M = 1336337;
const int P1K = 1009;
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const pair<T, U> &_p) {
  _out << _p.first << " " << _p.second;
  return _out;
}
template <typename T, typename U>
inline istream &operator>>(istream &_in, pair<T, U> &_p) {
  _in >> _p.first >> _p.second;
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const vector<T> &_v) {
  if (_v.empty()) return _out;
  _out << _v.front();
  for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T>
inline istream &operator>>(istream &_in, vector<T> &_v) {
  for (auto &_i : _v) _in >> _i;
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const set<T> &_s) {
  if (_s.empty()) return _out;
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const multiset<T> &_s) {
  if (_s.empty()) return _out;
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const unordered_set<T> &_s) {
  if (_s.empty()) return _out;
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const unordered_multiset<T> &_s) {
  if (_s.empty()) return _out;
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const map<T, U> &_m) {
  if (_m.empty()) return _out;
  _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')';
  for (auto _it = ++_m.begin(); _it != _m.end(); ++_it)
    _out << ", (" << _it->first << ": " << _it->second << ')';
  return _out;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const unordered_map<T, U> &_m) {
  if (_m.empty()) return _out;
  _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')';
  for (auto _it = ++_m.begin(); _it != _m.end(); ++_it)
    _out << ", (" << _it->first << ": " << _it->second << ')';
  return _out;
}
const char *infile = "";
const char *outfile = "";
inline int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
inline long long lcm(int a, int b) {
  return (long long)a * (long long)b / gcd(a, b);
}
inline long long pwm(long long xx, long long pow) {
  long long mlt = 1;
  while (pow) {
    if (pow & 1) {
      mlt *= xx;
      xx *= xx;
      pow >>= 1;
      xx %= MOD;
      mlt %= MOD;
    } else {
      pow >>= 1;
      xx *= xx;
      xx %= MOD;
    }
  }
  return mlt;
}
inline long long pw(long long xx, int pow) {
  long long mlt = 1;
  while (pow) {
    if (pow & 1) {
      mlt *= xx;
      xx *= xx;
      pow >>= 1;
    } else {
      pow >>= 1;
      xx *= xx;
    }
  }
  return mlt;
}
inline long long inv(long long r) { return pwm(r, RMOD); }
long double S(pair<pair<int, int>, pair<int, int>> crc) {
  return (long double)crc.second.first * (long double)crc.second.first * PI;
}
inline bool operator^(pair<pair<int, int>, pair<int, int>> a,
                      pair<pair<int, int>, pair<int, int>> b) {
  long long dst = ((long long)a.first.first - b.first.first) *
                      ((long long)a.first.first - b.first.first) +
                  ((long long)a.first.second - b.first.second) *
                      ((long long)a.first.second - b.first.second);
  return dst < (long long)b.second.first * b.second.first;
}
inline bool cmp(pair<pair<int, int>, pair<int, int>> a,
                pair<pair<int, int>, pair<int, int>> b) {
  return a.second.first > b.second.first;
}
inline void solve(long double tt) {
  int n;
  cin >> n;
  vector<pair<pair<int, int>, pair<int, int>>> dn;
  long double all = 0, drk = 0;
  for (int i = 0; i < n; ++i) {
    int first, second, r;
    cin >> first >> second >> r;
    pair<pair<int, int>, pair<int, int>> tmp = {{first, second}, {r, 1}};
    dn.push_back(tmp);
  }
  sort((dn).begin(), (dn).end(), cmp);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < i; ++j) {
      if (dn[i] ^ dn[j]) {
        dn[i].second.second = dn[j].second.second + 1;
      }
    }
    if (dn[i].second.second == 1) {
      all += S(dn[i]);
    }
    if (dn[i].second.second & 1) {
      drk += S(dn[i]);
    } else {
      drk -= S(dn[i]);
    }
  }
  cout << 2 * all - drk << "\n";
}
int main() {
  long double tt = clock();
  if (*infile != '\0') freopen(infile, "r", stdin);
  if (*outfile != '\0') freopen(outfile, "w", stdout);
  cout.tie(nullptr);
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << setprecision(20);
  cout << fixed;
  solve(tt);
  return 0;
}