#include <bits/stdc++.h>
using namespace std;
struct point {
  double x;
  double y;
  bool operator<(const point& pt) const {
    if (fabs(x - pt.x) > 1e-9) return (x < pt.x);
    if (fabs(y - pt.y) > 1e-9) return (y < pt.y);
    return false;
  }
};
struct circle {
  point p;
  double r;
};
double dist(point p1, point p2) {
  return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
}
int CircleIntersection(circle c1, circle c2, point* p1, point* p2) {
  double d = dist(c1.p, c2.p);
  if (d == 0 && c1.r == c2.r) return false;
  if (d > c1.r + c2.r) return false;
  if (d < fabs(c1.r - c2.r)) return false;
  double a = (c1.r * c1.r - c2.r * c2.r + d * d) / (2.0 * d);
  double h = sqrt(c1.r * c1.r - a * a);
  point p;
  p.x = c1.p.x + a * (c2.p.x - c1.p.x) / d;
  p.y = c1.p.y + a * (c2.p.y - c1.p.y) / d;
  p1->x = p.x + h * (c2.p.y - c1.p.y) / d;
  p1->y = p.y - h * (c2.p.x - c1.p.x) / d;
  p2->x = p.x - h * (c2.p.y - c1.p.y) / d;
  p2->y = p.y + h * (c2.p.x - c1.p.x) / d;
  return true;
}
const int MAXN = 1010;
int visited[MAXN];
int edges[MAXN][MAXN];
void dfs(int i, int n) {
  visited[i] = 1;
  for (int j = (0); j < (n); j++)
    if (!visited[j] && edges[i][j]) {
      dfs(j, n);
    }
}
int main() {
  point p1, p2;
  int n, V = 0, E = 0, K = 0;
  vector<circle> v;
  set<point> points;
  set<point> circlepoints;
  cin >> n;
  for (int i = (0); i < (n); i++) {
    circle c;
    cin >> c.p.x >> c.p.y >> c.r;
    v.push_back(c);
  }
  for (int i = (0); i < (n); i++) {
    for (int j = (0); j < (n); j++) {
      if (CircleIntersection(v[i], v[j], &p1, &p2) == true) {
        points.insert(p1);
        points.insert(p2);
        circlepoints.insert(p1);
        circlepoints.insert(p2);
        edges[i][j] = 1;
        edges[j][i] = 1;
      }
    }
    E += circlepoints.size();
    circlepoints.clear();
  }
  V = points.size();
  for (int i = (0); i < (n); i++)
    if (!visited[i]) {
      dfs(i, n);
      K++;
    }
  cout << (K + 1 + E - V);
  return 0;
}
