#include <bits/stdc++.h>
using namespace std;
struct Vertex {
  double x, y;
  Vertex(double x = 0, double y = 0) : x(x), y(y) {}
  Vertex operator+(const Vertex &r) const { return Vertex(x + r.x, y + r.y); }
  Vertex operator-(const Vertex &r) const { return Vertex(x - r.x, y - r.y); }
  Vertex operator*(const double &r) const { return Vertex(x * r, y * r); }
  Vertex operator/(const double &r) const { return Vertex(x / r, y / r); }
  bool operator<(const Vertex &r) const {
    if (fabs(x - r.x) < 1e-6) return y < r.y;
    return x < r.x;
  }
  bool operator==(const Vertex &r) const {
    if (fabs(x - r.x) < 1e-6 && fabs(y - r.y) < 1e-6) return true;
    return false;
  }
  double len() const { return sqrt(x * x + y * y); }
  Vertex norm() const { return *this / len(); }
  Vertex rotate() const { return Vertex(-y, x); }
  void read() { scanf("%lf %lf", &x, &y); }
  void print() const { printf("%lf %lf\n", x, y); }
};
struct Circle {
  Vertex O;
  double r;
  void read() {
    O.read();
    scanf("%lf", &r);
  }
} circle[5];
Vertex ret[10000];
int sz = 0;
void intersect(Circle a, Circle b) {
  Vertex A = a.O, B = b.O;
  double r1 = a.r, r2 = b.r;
  double L = (A - B).len();
  if (L < fabs(r1 - r2) || L > fabs(r1 + r2)) return;
  double D = 0.5 * (L + (r1 * r1 - r2 * r2) / L);
  Vertex H = A + (B - A).norm() * D;
  double len = sqrt(r1 * r1 - D * D);
  Vertex tmp = (B - A).rotate().norm() * len;
  ret[sz++] = H + tmp;
  ret[sz++] = H - tmp;
}
int fa[10000];
int s[10000];
int getroot(int x) { return x == fa[x] ? x : fa[x] = getroot(fa[x]); }
void connect(int a, int b) {
  a = getroot(a);
  b = getroot(b);
  if (a == b) return;
  fa[a] = b;
  s[b] += s[a];
}
int main() {
  int ans = 1;
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) circle[i].read();
  if (n == 1) return puts("2"), 0;
  if (n == 2) {
    intersect(circle[0], circle[1]);
    if (sz != 2 || ret[0] == ret[1]) return puts("3"), 0;
    return puts("4"), 0;
  }
  if (n == 3) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < i; j++) intersect(circle[i], circle[j]);
    sort(ret, ret + sz);
    sz = unique(ret, ret + sz) - ret;
    ans -= sz;
    for (int i = 0; i < sz; i++) {
      fa[i] = i;
      s[i] = 1;
    }
    for (int i = 0; i < n; i++) {
      int tmp = -1;
      for (int j = 0; j < sz; j++)
        if (fabs(circle[i].r * circle[i].r -
                 (circle[i].O - ret[j]).len() * (circle[i].O - ret[j]).len()) <
            1e-6) {
          ans++;
          if (tmp == -1)
            tmp = j;
          else
            connect(tmp, j);
        }
      if (tmp == -1) ans++;
    }
    for (int i = 0; i < sz; i++)
      if (fa[i] == i) ans++;
    printf("%d\n", ans);
  }
  return 0;
}
