#include <bits/stdc++.h>
using namespace std;
const int N = 3;
struct point2d {
  long double x, y;
  point2d() {}
  point2d(long double _x, long double _y) : x(_x), y(_y) {}
  bool operator<(const point2d other) const {
    if (fabs(x - other.x) > 1e-9) return x < other.x;
    if (fabs(y - other.y) > 1e-9) return y < other.y;
    return false;
  }
  bool operator==(const point2d other) const {
    return fabs(x - other.x) <= 1e-9 && fabs(y - other.y) <= 1e-9;
  }
};
struct line2d {
  long double a, b, c;
  line2d() {}
  line2d(long double _a, long double _b, long double _c)
      : a(_a), b(_b), c(_c) {}
};
struct circle2d {
  point2d p;
  long double r;
  circle2d() {}
  circle2d(point2d _p, long double _r) : p(_p), r(_r) {}
};
point2d rotate90(point2d p) { return point2d(-p.y, p.x); }
vector<point2d> circleLineIntersection(circle2d c, line2d l) {
  long double x0 = -l.a * l.c / (l.a * l.a + l.b * l.b);
  long double y0 = -l.b * l.c / (l.a * l.a + l.b * l.b);
  if (l.c * l.c > c.r * c.r * (l.a * l.a + l.b * l.b) + 1e-9) {
    return {};
  }
  if (fabs(l.c * l.c - c.r * c.r * (l.a * l.a + l.b * l.b)) <= 1e-9) {
    return {point2d(x0, y0)};
  }
  long double d = c.r * c.r - l.c * l.c / (l.a * l.a + l.b * l.b);
  long double mult = sqrt(d / (l.a * l.a + l.b * l.b));
  long double ax, ay, bx, by;
  ax = x0 + l.b * mult;
  bx = x0 - l.b * mult;
  ay = y0 - l.a * mult;
  by = y0 + l.a * mult;
  return {point2d(ax, ay), point2d(bx, by)};
}
vector<point2d> circleCircleIntersetion(circle2d a, circle2d b) {
  if (a.p == b.p) {
    return {};
  }
  long double dx = a.p.x, dy = a.p.y;
  b.p.x -= dx;
  b.p.y -= dy;
  long double A = -2 * b.p.x;
  long double B = -2 * b.p.y;
  long double C = b.p.x * b.p.x + b.p.y * b.p.y + a.r * a.r - b.r * b.r;
  vector<point2d> ans = circleLineIntersection(a, line2d(A, B, C));
  for (auto &p : ans) {
    p.x += dx;
    p.y += dy;
  }
  return ans;
}
int n, used[3];
vector<int> g[3];
vector<circle2d> circles;
void dfs(int v) {
  used[v] = true;
  for (int u : g[v])
    if (!used[u]) dfs(u);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  circles.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> circles[i].p.x >> circles[i].p.y >> circles[i].r;
  }
  long long int v = 0, e = 0, c = 0;
  vector<point2d> pts;
  for (int i = 0; i < n; ++i) {
    vector<point2d> ptt;
    for (int j = 0; j < n; ++j) {
      if (i == j) continue;
      vector<point2d> p = circleCircleIntersetion(circles[i], circles[j]);
      if (p.size() > 0) {
        g[i].push_back(j);
        g[j].push_back(i);
        for (auto pt : p) {
          ptt.push_back(pt);
          pts.push_back(pt);
        }
      }
    }
    sort(ptt.begin(), ptt.end());
    ptt.erase(unique(ptt.begin(), ptt.end()), ptt.end());
    e += ptt.size();
  }
  sort(pts.begin(), pts.end());
  pts.erase(unique(pts.begin(), pts.end()), pts.end());
  v += pts.size();
  for (int i = 0; i < n; ++i) {
    if (!used[i]) {
      dfs(i);
      ++c;
    }
  }
  cout << e - v + c + 1 << "\n";
  return 0;
}
