#include <bits/stdc++.h>
using namespace std;
const long double eps = 0.000001;
struct Point {
  long double x, y;
  Point(long double _x = 0, long double _y = 0) {
    x = _x;
    y = _y;
  }
  bool operator==(Point other) const {
    return (abs(x - other.x) < eps && abs(y - other.y) < eps);
  }
  Point operator+(Point other) { return Point(x + other.x, y + other.y); }
  Point operator-(Point other) { return Point(x - other.x, y - other.y); }
  Point operator*(long double other) { return Point(x * other, y * other); }
  Point operator/(long double other) { return Point(x / other, y / other); }
  long double dist2() { return (x * x + y * y); }
  long double dist() { return sqrt(dist2()); }
  Point perp() { return Point(-y, x); }
};
struct Circle {
  Point center;
  long double radius;
  Circle(Point c = Point(0, 0), long double r = 0) {
    center = c;
    radius = r;
  }
  bool operator==(Circle other) {
    return (center == other.center && abs(radius - other.radius) < eps);
  }
};
const int MAXN = 210;
int n;
int vertices;
int edges;
int components;
Circle circles[MAXN];
vector<Point> points;
vector<int> gr[MAXN];
int viz[MAXN];
bool intersect(Circle a, Circle b, pair<Point, Point>& ans) {
  double d = (a.center - b.center).dist();
  if (d > a.radius + b.radius + eps || d < abs(a.radius - b.radius) - eps)
    return false;
  double dt = (a.radius * a.radius - b.radius * b.radius) / d,
         d1 = (d + dt) / 2;
  Point dir = (b.center - a.center) / d;
  Point pcrs = a.center + dir * d1;
  dt = sqrt(max(0.0L, a.radius * a.radius - d1 * d1)), dir = dir.perp();
  ans = {pcrs + dir * dt, pcrs - dir * dt};
  return true;
}
void unique_circles() {
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      if (circles[i] == circles[j]) {
        circles[j] = circles[n];
        --n;
        --j;
        continue;
      }
    }
  }
}
void read() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    Point center;
    double radius;
    cin >> center.x >> center.y >> radius;
    circles[i] = {center, radius};
    points.push_back(Point(center.x, center.y + radius));
    points.push_back(Point(center.x, center.y - radius));
    points.push_back(Point(center.x - radius, center.y));
    points.push_back(Point(center.x + radius, center.y));
    vertices += 4;
  }
  unique_circles();
}
void find_intersections() {
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      pair<Point, Point> cur;
      if (intersect(circles[i], circles[j], cur)) {
        points.push_back(cur.first);
        points.push_back(cur.second);
        gr[i].push_back(j);
        gr[j].push_back(i);
        vertices += 2;
      }
    }
  }
}
void unique_vertices() {
  for (int i = 0; i < vertices; ++i) {
    for (int j = i + 1; j < vertices; ++j) {
      if (points[i] == points[j]) {
        points[j] = points[vertices - 1];
        points.pop_back();
        vertices--;
        --j;
        continue;
      }
    }
  }
}
bool OnCircle(Point p, Circle c) {
  long double dx = p.x - c.center.x;
  long double dy = p.y - c.center.y;
  long double dist = (dx * dx) + (dy * dy);
  return (abs(dist - (c.radius * c.radius)) < eps);
}
void count_edges() {
  unique_vertices();
  for (int i = 0; i < vertices; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (OnCircle(points[i], circles[j])) {
        ++edges;
      }
    }
  }
}
void dfs(int node) {
  viz[node] = true;
  for (auto x : gr[node])
    if (!viz[x]) dfs(x);
}
void count_components() {
  memset(viz, 0, sizeof viz);
  for (int i = 1; i <= n; ++i) {
    if (!viz[i]) {
      dfs(i);
      components++;
    }
  }
}
int main() {
  read();
  find_intersections();
  count_edges();
  count_components();
  int faces = edges - vertices + components;
  cout << faces + 1;
  return 0;
}
