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>
using namespace std;
template <class T>
T Bitcnt(T a) {
  int sum = 0;
  while (a) {
    if (a & 1) sum++;
    a /= 2;
  }
  return sum;
}
template <class T>
T Max3(T a, T b, T c) {
  return max(a, max(b, c));
}
template <class T>
T Lcm(T a, T b) {
  T tmp = __gcd(a, b);
  return (a / tmp) * b;
}
template <class T>
T Pow(T a, T b) {
  T ans = 1;
  T base = a;
  while (b) {
    if (b & 1) ans = (ans * base);
    base = (base * base);
    b /= 2;
  }
  return ans;
}
long long Bigmod(long long a, long long b) {
  long long res = 1;
  long long pw = a % 1000000007LL;
  while (b > 0) {
    if (b & 1) res = (res * pw) % 1000000007LL;
    pw = (pw * pw) % 1000000007LL;
    b /= 2;
  }
  return res;
}
int a_x[] = {1, -1, 0, 0};
int a_y[] = {0, 0, 1, -1};
long long X, Y;
void extend_euclid(long long a, long long b) {
  if (b == 0) {
    X = 1;
    Y = 0;
    return;
  }
  extend_euclid(b, a % b);
  long long x, y;
  x = Y;
  y = X - (a / b) * Y;
  X = x;
  Y = y;
}
long long inverse_modulo(long long a, long long b) {
  extend_euclid(a, b);
  return (X + 1000000007LL) % 1000000007LL;
}
int mn[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
struct info {
  int x, y, r;
} data[1005];
vector<int> g[1005];
vector<int> graph[1005];
int n;
bool inside[1005][1005];
bool visit[1005];
vector<int> st;
int par[1005];
long long int dist(long long int x1, long long int y1, long long int x2,
                   long long int y2) {
  return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
}
bool Inside(long long int id1, long long int id2) {
  long long int d = dist(data[id1].x, data[id1].y, data[id2].x, data[id2].y);
  double f = sqrt((double)d);
  f += ((double)data[id2].r);
  if (data[id1].r + 1e-9 >= f)
    return true;
  else
    return false;
}
void dfs(int node) {
  visit[node] = 1;
  int len = graph[node].size();
  for (int i = 0; i < len; i++) {
    int v = graph[node][i];
    if (visit[v] == 0) {
      dfs(v);
    }
  }
  st.push_back(node);
}
void pre() {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      inside[i][j] = Inside(i, j);
      if (inside[i][j]) graph[i].push_back(j);
    }
  for (int i = 1; i <= n; i++) {
    if (visit[i] == 0) dfs(i);
  }
  for (int i = 0; i < n; i++) {
    int u = st[i];
    for (int v = 1; v <= n; v++) {
      if (inside[u][v]) {
        if (par[v] == 0) {
          par[v] = u;
          g[u].push_back(v);
        }
      }
    }
  }
}
long long dp[1005][5];
bool ok[1005][5];
long long solve(int node, int taken) {
  long long &ret = dp[node][taken];
  if (ok[node][taken]) return ret;
  ok[node][taken] = 1;
  ret = 0;
  int len = g[node].size();
  if (taken == 0) {
    ret = data[node].r * 1LL * data[node].r;
    for (int i = 0; i < len; i++) {
      int v = g[node][i];
      if (par[node] == v) continue;
      ret += solve(v, taken + 1);
    }
  }
  if (taken == 1) {
    long long ret1 = data[node].r * 1LL * data[node].r;
    ret1 *= (-1);
    for (int i = 0; i < len; i++) {
      int v = g[node][i];
      if (par[node] == v) continue;
      ret1 += solve(v, taken - 1);
    }
    long long ret2 = data[node].r * 1LL * data[node].r;
    for (int i = 0; i < len; i++) {
      int v = g[node][i];
      if (par[node] == v) continue;
      ret2 += solve(v, taken + 1);
    }
    ret = max(ret1, ret2);
  }
  if (taken == 2) {
    ret = data[node].r * 1LL * data[node].r;
    ret *= (-1);
    for (int i = 0; i < len; i++) {
      int v = g[node][i];
      if (par[node] == v) continue;
      ret += solve(v, taken - 1);
    }
  }
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%d %d %d", &data[i].x, &data[i].y, &data[i].r);
  pre();
  memset(dp, -1, sizeof dp);
  long long res = 0;
  for (int i = 1; i <= n; i++) {
    if (par[i] == 0) res += solve(i, 0);
  }
  printf("%.12lf\n", res * 1.0 * acos(-1.0));
  return 0;
}