#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-12;
struct Point {
  long double x, y;
  Point() {}
  Point(long double _x, long double _y) : x(_x), y(_y) {}
  Point operator+(const Point& t) const { return Point(x + t.x, y + t.y); }
  Point operator-(const Point& t) const { return Point(x - t.x, y - t.y); }
  Point operator*(const long double& p) const { return Point(x * p, y * p); }
  Point operator/(const long double& p) const { return Point(x / p, y / p); }
  bool operator<(const Point& t) const {
    return fabs(x - t.x) < eps ? y < t.y : x < t.x;
  }
  bool operator==(const Point& t) const {
    return fabs(x - t.x) < eps && fabs(y - t.y) < eps;
  }
  long double Length() { return sqrt(x * x + y * y); }
  Point rot90() { return Point(-y, x); }
};
struct Circle {
  Point o;
  long double r;
  Circle() {}
  Circle(Point _o, long double _r) : o(_o), r(_r) {}
};
vector<Point> Circle_Circle_Cross(const Circle& c1, const Circle& c2) {
  long double d = (c1.o - c2.o).Length();
  if (d > c1.r + c2.r + eps || d < fabs(c1.r - c2.r) - eps)
    return vector<Point>();
  long double dt = (c1.r * c1.r - c2.r * c2.r) / d, d1 = (d + dt) / 2;
  Point dir = (c2.o - c1.o) / d, pcrs = c1.o + dir * d1;
  dt = sqrt(max(0.0L, c1.r * c1.r - d1 * d1)), dir = dir.rot90();
  return vector<Point>{pcrs + dir * dt, pcrs - dir * dt};
}
int n, v, e, c;
Circle p[5];
int f[5];
int sf(int x) { return x == f[x] ? x : f[x] = sf(f[x]); }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) cin >> p[i].o.x >> p[i].o.y >> p[i].r;
  for (int i = 1; i <= n; i++) f[i] = i;
  vector<Point> all;
  for (int i = 1; i <= n; i++) {
    vector<Point> pat;
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      vector<Point> tmp = Circle_Circle_Cross(p[i], p[j]);
      if (!tmp.size()) continue;
      f[sf(i)] = sf(j);
      for (auto p : tmp) pat.push_back(p), all.push_back(p);
    }
    sort(pat.begin(), pat.end());
    e += unique(pat.begin(), pat.end()) - pat.begin();
  }
  sort(all.begin(), all.end());
  v = unique(all.begin(), all.end()) - all.begin();
  for (int i = 1; i <= n; i++)
    if (sf(i) == i) c++;
  printf("%d\n", e - v + c + 1);
}
