#include <bits/stdc++.h>
using namespace std;
int x[3], y[3], r[3], _x[3], _y[3], _r[3];
int n, _n;
vector<int> g[3];
bool vis[3];
void dfs(int u) {
  vis[u] = 1;
  for (int &v : g[u]) {
    if (!vis[v]) {
      dfs(v);
    }
  }
  return;
}
int sqr(int x) { return x * x; }
bool qie(int x1, int y1, int r1, int x2, int y2, int r2) {
  int d = sqr(x1 - x2) + sqr(y1 - y2);
  return sqr(r1 - r2) == d || sqr(r1 + r2) == d;
}
bool jiao(int x1, int y1, int r1, int x2, int y2, int r2) {
  int d = sqr(x1 - x2) + sqr(y1 - y2);
  return sqr(r1 - r2) < d && d < sqr(r1 + r2);
}
int calc(int x1, int y1, int r1, int x2, int y2, int r2) {
  if (jiao(x1, y1, r1, x2, y2, r2)) {
    return 2;
  }
  if (qie(x1, y1, r1, x2, y2, r2)) {
    return 1;
  }
  return 0;
}
struct Point {
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
};
Point operator-(Point A, Point B) { return Point(A.x + B.x, A.y + B.y); }
Point operator+(Point A, Point B) { return Point(A.x + B.x, A.y + B.y); }
Point operator*(Point A, double p) { return Point(A.x * p, A.y * p); }
Point operator/(Point A, double p) { return Point(A.x / p, A.y / p); }
double Dot(Point A, Point B) { return A.x * B.x + A.y * B.y; }
double Length(Point A) { return sqrt(Dot(A, A)); }
double Angle(Point A, Point B) {
  return acos(Dot(A, B) / Length(A) / Length(B));
}
double angle(Point v) { return atan2(v.y, v.x); }
const double eps = 1e-8;
int dcmp(double x) {
  if (fabs(x) < eps)
    return 0;
  else
    return x < 0 ? -1 : 1;
}
Point cao(double a, int x, int y, int r) {
  return Point(x + cos(a) * r, y + sin(a) * r);
}
bool operator==(const Point &a, const Point &b) {
  return dcmp(a.x - b.x) == 0 && dcmp(a.y - b.y) == 0;
}
const double pi = acos(-1);
int getjiao(int x1, int y1, int r1, int x2, int y2, int r2, vector<Point> &t) {
  int d2 = sqr(x1 - x2) + sqr(y1 - y2);
  double d = sqrt(d2);
  double a = angle(Point(x2 - x1, y2 - y1));
  double da = acos((r1 * r1 + d2 - r2 * r2) / (2 * r1 * d));
  Point p1 = cao(a - da, x1, y1, r1), p2 = cao(a + da, x1, y1, r1);
  t.push_back(p1);
  if (p1 == p2) return 1;
  t.push_back(p2);
  return 2;
}
int main() {
  scanf("%d", &_n);
  for (int i = 0; i < _n; ++i) {
    scanf("%d%d%d", _x + i, _y + i, _r + i);
    bool ok = 1;
    for (int j = 0; j < n; ++j) {
      if (_x[i] == x[j] && _y[i] == y[j] && _r[i] == r[j]) {
        ok = 0;
        break;
      }
    }
    if (ok) {
      x[n] = _x[i];
      y[n] = _y[i];
      r[n] = _r[i];
      ++n;
    }
  }
  if (n == 1) {
    puts("2");
    return 0;
  }
  if (n == 2) {
    if (jiao(x[0], y[0], r[0], x[1], y[1], r[1])) {
      puts("4");
      return 0;
    } else {
      puts("3");
      return 0;
    }
  }
  int V = 0, E = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < i; ++j) {
      int t = calc(x[i], y[i], r[i], x[j], y[j], r[j]);
      V += t;
    }
  }
  for (int i = 0; i < n; ++i) {
    int cnt = 0;
    for (int j = 0; j < n; ++j) {
      if (j == i) {
        continue;
      }
      int t = calc(x[i], y[i], r[i], x[j], y[j], r[j]);
      cnt += t;
      if (t) {
        g[i].push_back(j);
        g[j].push_back(i);
      }
    }
    if (cnt <= 1) {
      ++E;
    } else {
      E += cnt;
    }
  }
  int C = 0;
  for (int i = 0; i < n; ++i) {
    if (!vis[i]) {
      ++C;
      dfs(i);
    }
  }
  if (C == 3) {
    puts("4");
    return 0;
  }
  if (C == 2) {
    printf("%d\n", E - V + 2);
    return 0;
  }
  vector<Point> fuck, tmp, ffuck;
  V = E = 0;
  ffuck.clear();
  for (int i = 0; i < n; ++i) {
    int cnt = 0;
    fuck.clear();
    for (int j = 0; j < n; ++j) {
      if (j != i) {
        tmp.clear();
        if (!calc(x[i], y[i], r[i], x[j], y[j], r[j])) {
          continue;
        }
        getjiao(x[i], y[i], r[i], x[j], y[j], r[j], tmp);
        for (auto &t : tmp) {
          bool ok = 1;
          for (auto &s : fuck) {
            if (t == s) {
              ok = 0;
              break;
            }
          }
          if (ok) {
            fuck.push_back(t);
          }
        }
      }
    }
    cnt = (int)fuck.size();
    if (cnt <= 1) {
      ++E;
    } else {
      E += cnt;
    }
    for (auto &t : fuck) {
      bool ok = 1;
      for (auto &s : ffuck) {
        if (t == s) {
          ok = 0;
          break;
        }
      }
      if (ok) {
        ffuck.push_back(t);
      }
    }
  }
  V = ffuck.size();
  printf("%d\n", E - V + 2);
  return 0;
}
