#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
const double eps = 1e-9;
struct Vector {
  double x, y;
  Vector() {}
  Vector(double _, double __) : x(_), y(__) {}
  Vector operator-(const Vector& t) const { return Vector(x - t.x, y - t.y); }
  double len() { return sqrt(x * x + y * y); }
  bool operator<(const Vector& t) const {
    return abs(x - t.x) > eps ? x < t.x : y < t.y;
  }
  bool operator==(const Vector& t) const {
    return abs(x - t.x) <= eps && abs(y - t.y) <= eps;
  }
} ps[100], crs[5][100];
int cp, cc[5];
struct Circle {
  Vector p;
  double r;
  Circle() {}
  Circle(Vector _, double __) : p(_), r(__) {}
  Vector point(double a) { return Vector(cos(a) * r + p.x, sin(a) * r + p.y); }
} cs[5];
double angle(Vector x) { return atan2(x.y, x.x); }
vector<Vector> getcross(Circle c1, Circle c2) {
  vector<Vector> p;
  p.resize(0);
  Vector t = c2.p - c1.p;
  double d = t.len(), a = angle(t);
  if (abs(d) <= eps) return p;
  if (d < abs(c2.r - c1.r) || d > c2.r + c1.r) return p;
  double da = acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2 * c1.r * d));
  Vector p1 = c1.point(a + da), p2 = c1.point(a - da);
  p.push_back(p1);
  if (p1 == p2) return p;
  p.push_back(p2);
  return p;
}
int fa[5];
int findset(int x) { return x == fa[x] ? x : fa[x] = findset(fa[x]); }
int main() {
  int n = read();
  for (int i = (1), mi = (n); i <= mi; i++) {
    int x = read(), y = read(), r = read();
    cs[i] = Circle(Vector(x, y), r);
    fa[i] = i;
  }
  int V, E = 0, C = n;
  for (int i = (1), mi = (n); i <= mi; i++) {
    for (int j = (1), mi = (n); j <= mi; j++)
      if (i != j) {
        vector<Vector> tmp = getcross(cs[i], cs[j]);
        for (auto k : tmp) crs[i][++cc[i]] = k;
        if (tmp.size() > 0) {
          int u = findset(i), v = findset(j);
          if (u != v) fa[v] = u, C--;
        }
      }
    sort(crs[i] + 1, crs[i] + cc[i] + 1);
    cc[i] = unique(crs[i] + 1, crs[i] + cc[i] + 1) - crs[i] - 1;
    E += cc[i];
    for (int j = (1), mi = (cc[i]); j <= mi; j++) ps[++cp] = crs[i][j];
  }
  sort(ps + 1, ps + cp + 1);
  cp = unique(ps + 1, ps + cp + 1) - ps - 1;
  V = cp;
  printf("%d\n", E - V + C + 1);
  return 0;
}
