#include <bits/stdc++.h>
using namespace std;
const int NMAX = 210;
const double EPS = 1e-6;
int N, X[NMAX], Y[NMAX], R[NMAX], Father[NMAX], Size[NMAX], UsedForest[NMAX],
    TotalVertexes, TotalEdges, TotalConnectedComp;
vector<pair<double, double> > Vertex, VertexCircle;
vector<pair<double, pair<double, double> > > Circle;
int Root(int X) {
  int P, Y;
  for (P = X; P != Father[P]; P = Father[P])
    ;
  for (; X != Father[X];) {
    Y = Father[X];
    Father[X] = P;
    X = Y;
  }
  return P;
}
void Merge(int X, int Y) {
  if (Root(X) == Root(Y)) return;
  TotalConnectedComp--;
  if (Size[X] > Size[Y]) {
    Father[Y] = X;
    Size[X] += Size[Y];
  } else {
    Father[X] = Y;
    Size[Y] += Size[X];
  }
}
double Dist(int i, int j) {
  return sqrt(1LL * (X[i] - X[j]) * (X[i] - X[j]) +
              1LL * (Y[i] - Y[j]) * (Y[i] - Y[j]));
}
bool Less(double A, double B) { return A < B - EPS; }
bool Equal(double A, double B) { return fabs(A - B) < EPS; }
bool CompCircles(const pair<double, pair<double, double> > &A,
                 const pair<double, pair<double, double> > &B) {
  return (Equal(A.first, B.first) && Equal(A.second.first, B.second.first) &&
          Equal(A.second.second, B.second.second));
}
void Intersect(int i, int j) {
  if (R[i] < R[j]) swap(i, j);
  double D = Dist(i, j);
  if (Less(R[i] + R[j], D) || Less(D, R[i] - R[j])) return;
  Merge(Root(i), Root(j));
  double A = (R[i] * R[i] - R[j] * R[j] + D * D) / (2 * D);
  double X2 = X[i] + A * (X[j] - X[i]) / D;
  double Y2 = Y[i] + A * (Y[j] - Y[i]) / D;
  double H = sqrt(R[i] * R[i] - A * A);
  double Xc1 = X2 + H * (Y[j] - Y[i]) / D;
  double Yc1 = Y2 - H * (X[j] - X[i]) / D;
  bool OK = 1;
  for (int k = 0; k < VertexCircle.size() && OK; ++k)
    if (Equal(VertexCircle[k].first, Xc1) && Equal(VertexCircle[k].second, Yc1))
      OK = 0;
  if (OK) TotalEdges++, VertexCircle.push_back(make_pair(Xc1, Yc1));
  double Xc2 = X2 - H * (Y[j] - Y[i]) / D;
  double Yc2 = Y2 + H * (X[j] - X[i]) / D;
  OK = 1;
  for (int k = 0; k < VertexCircle.size() && OK; ++k)
    if (Equal(VertexCircle[k].first, Xc2) && Equal(VertexCircle[k].second, Yc2))
      OK = 0;
  if (OK && !(Equal(Xc1, Xc2) && Equal(Yc1, Yc2)))
    TotalEdges++, VertexCircle.push_back(make_pair(Xc2, Yc2));
}
int main() {
  cin >> N;
  for (int i = 1; i <= N; ++i) {
    cin >> X[i] >> Y[i] >> R[i];
    Circle.push_back(make_pair(X[i], make_pair(Y[i], R[i])));
  }
  sort(Circle.begin(), Circle.end());
  Circle.resize(unique(Circle.begin(), Circle.end(), CompCircles) -
                Circle.begin());
  N = Circle.size();
  TotalConnectedComp = N;
  for (int i = 0; i < N; ++i) {
    X[i + 1] = Circle[i].first;
    Y[i + 1] = Circle[i].second.first;
    R[i + 1] = Circle[i].second.second;
  }
  for (int i = 1; i <= N; ++i) Father[i] = i, Size[i] = 1;
  for (int i = 1; i <= N; ++i) {
    VertexCircle.clear();
    for (int j = 1; j <= N; ++j)
      if (i != j) Intersect(i, j);
    for (int j = 0; j < VertexCircle.size(); ++j) {
      bool OK = 1;
      for (int k = 0; k < Vertex.size() && OK; ++k)
        if (Equal(Vertex[k].first, VertexCircle[j].first) &&
            Equal(Vertex[k].second, VertexCircle[j].second))
          OK = 0;
      if (OK) Vertex.push_back(VertexCircle[j]);
    }
  }
  TotalVertexes = Vertex.size();
  cout << TotalEdges - TotalVertexes + TotalConnectedComp + 1;
}
