#include <bits/stdc++.h>
using namespace std;
const long long EPS = 10000LL;
int A[205][205], n, f[205];
long long N, M, NrCC;
struct cerc {
  double X;
  double Y;
  double R;
} v[205];
set<pair<long long, long long> > S[205], ALL;
pair<double, double> P, Q;
inline bool cmp(const cerc &a, const cerc &b) {
  if (a.X == b.X)
    if (a.Y == b.Y)
      return a.R < b.R;
    else
      return a.Y < b.Y;
  else
    return a.X < b.X;
}
inline double dist(double X1, double Y1, double X2, double Y2) {
  return sqrt(1.0 * ((X2 - X1) * (X2 - X1) + (Y2 - Y1) * (Y2 - Y1)));
}
inline double heron(double a, double b, double c) {
  double p = (a + b + c) / 2.0;
  return sqrt(1.0 * (p * (p - a) * (p - b) * (p - c)));
}
int intersect(cerc C1, cerc C2, pair<double, double> &P1,
              pair<double, double> &P2) {
  if (C1.X == C2.X && C1.Y == C2.Y) return 0;
  double SquareCentersDistance =
      (C1.X - C2.X) * (C1.X - C2.X) + (C1.Y - C2.Y) * (C1.Y - C2.Y);
  if (SquareCentersDistance > (C1.R + C2.R) * (C1.R + C2.R)) return 0;
  if (SquareCentersDistance < (C1.R - C2.R) * (C1.R - C2.R)) return 0;
  if (SquareCentersDistance == (C1.R + C2.R) * (C1.R + C2.R)) {
    P1.first = C1.X + C1.R * (C2.X - C1.X) / (1.0 * C1.R + 1.0 * C2.R);
    P1.second = C1.Y + C1.R * (C2.Y - C1.Y) / (1.0 * C1.R + 1.0 * C2.R);
    return 1;
  }
  if (SquareCentersDistance == (C1.R - C2.R) * (C1.R - C2.R)) {
    if (C1.R < C2.R) {
      cerc aux = C1;
      C1 = C2;
      C2 = aux;
    }
    P1.first = C1.X + C1.R * (C2.X - C1.X) / (1.0 * C1.R - 1.0 * C2.R);
    P1.second = C1.Y + C1.R * (C2.Y - C1.Y) / (1.0 * C1.R - 1.0 * C2.R);
    return 1;
  }
  if (C1.X == C2.X) {
    if (C1.Y < C2.Y) {
      cerc aux = C1;
      C1 = C2;
      C2 = aux;
    }
    double D = dist(C1.X, C1.Y, C2.X, C2.Y);
    double aria = heron(C1.R, C2.R, D);
    double d = (2.0 * aria) / D;
    double d1 = sqrt(C1.R * C1.R - d * d);
    P1.first = C1.X - d;
    P2.first = C1.X + d;
    P1.second = P2.second = C1.Y - d1;
    return 2;
  }
  if (C1.Y == C2.Y) {
    if (C1.X > C2.X) {
      cerc aux = C1;
      C1 = C2;
      C2 = aux;
    }
    double D = dist(C1.X, C1.Y, C2.X, C2.Y);
    double aria = heron(C1.R, C2.R, D);
    double d = (2.0 * aria) / D;
    double d1 = sqrt(C1.R * C1.R - d * d);
    P1.second = C1.Y - d;
    P2.second = C1.Y + d;
    P1.first = P2.first = C1.X + d1;
    return 2;
  }
  double A, B, C, a, b, c;
  A = 2.0 * C1.X - 2.0 * C2.X;
  B = 2.0 * C1.Y - 2.0 * C2.Y;
  C = 1.0 * C2.X * C2.X - C1.X * C1.X + C2.Y * C2.Y - C1.Y * C1.Y +
      C1.R * C1.R - C2.R * C2.R;
  a = B * B + A * A;
  b = 2.0 * A * B * C1.Y + 2.0 * A * C - 2.0 * C1.X * B * B;
  c = C1.X * C1.X * B * B + C * C + 2 * C1.Y * B * C + C1.Y * C1.Y * B * B -
      C1.R * C1.R * B * B;
  double delta = 1.0 * b * b - 4.0 * a * c;
  P1.first = (-b - sqrt(delta)) / (2.0 * a);
  P2.first = (-b + sqrt(delta)) / (2.0 * a);
  P1.second = (-1.0 * C - A * P1.first) / B;
  P2.second = (-1.0 * C - A * P2.first) / B;
  return 2;
}
void dfs(int nod) {
  f[nod] = 1;
  for (int i = 1; i <= n; i++)
    if (A[nod][i] == 1 && f[i] == 0) dfs(i);
}
inline pair<long long, long long> hashing(pair<double, double> Pct) {
  long long x = (long long)(Pct.first * EPS);
  long long y = (long long)(Pct.second * EPS);
  return make_pair(x, y);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i].X >> v[i].Y >> v[i].R;
  sort(v + 1, v + n + 1, cmp);
  int k = 1;
  for (int i = 2; i <= n; i++) {
    if (!((v[k].X == v[i].X) && (v[k].Y == v[i].Y) && (v[k].R == v[i].R))) {
      v[++k] = v[i];
    }
  }
  n = k;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      int nrp = intersect(v[i], v[j], P, Q);
      pair<long long, long long> Ps = hashing(P);
      if (nrp != 0) {
        A[i][j] = A[j][i] = 1;
        S[i].insert(Ps);
        S[j].insert(Ps);
        ALL.insert(Ps);
        if (nrp == 2) {
          pair<long long, long long> Qs = hashing(Q);
          S[i].insert(Qs);
          S[j].insert(Qs);
          ALL.insert(Qs);
        }
      }
    }
  }
  N = ALL.size();
  for (int i = 1; i <= n; i++) {
    if (S[i].size() >= 1) {
      M += S[i].size();
    } else {
      M++;
      N++;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (f[i] == 0) {
      NrCC++;
      dfs(i);
    }
  }
  cout << M - N + NrCC + 1 << "\n";
  return 0;
}
