#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double inf = 1e20;
const double pi = acos(-1.0);
int sgn(double x) {
  if (fabs(x) < eps) return 0;
  if (x < 0)
    return -1;
  else
    return 1;
}
inline double sqr(double x) { return x * x; }
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) {
    x = _x;
    y = _y;
  }
  double distance(Point p) { return hypot(x - p.x, y - p.y); }
  double len() { return hypot(x, y); }
  Point trunc(double r) {
    double l = len();
    if (!sgn(l)) return *this;
    r /= l;
    return Point(x * r, y * r);
  }
  bool operator==(Point b) const {
    return sgn(x - b.x) == 0 && sgn(y - b.y) == 0;
  }
  bool operator<(Point b) const {
    return sgn(x - b.x) == 0 ? sgn(y - b.y) < 0 : x < b.x;
  }
  Point operator-(const Point& b) const { return Point(x - b.x, y - b.y); }
  Point operator+(const Point& b) const { return Point(x + b.x, y + b.y); }
  double operator^(const Point& b) const { return x * b.y - y * b.x; }
  double operator*(const Point& b) const { return x * b.x + y * b.y; }
  Point rotleft() { return Point(-y, x); }
  Point rotright() { return Point(y, -x); }
};
struct circle {
  Point p;
  double r;
  circle() {}
  circle(Point _p, double _r) {
    p = _p;
    r = _r;
  }
  circle(double x, double y, double _r) {
    p = Point(x, y);
    r = _r;
  }
  int relationcircle(circle v) {
    double d = p.distance(v.p);
    if (sgn(d - r - v.r) > 0) return 5;
    if (sgn(d - r - v.r) == 0) return 4;
    double l = fabs(r - v.r);
    if (sgn(d - r - v.r) < 0 && sgn(d - l) > 0) return 3;
    if (sgn(d - l) == 0) return 2;
    if (sgn(d - l) < 0) return 1;
  }
  int pointcrosscircle(circle v, Point& p1, Point& p2) {
    int rel = relationcircle(v);
    if (rel == 1 || rel == 5) return 0;
    double d = p.distance(v.p);
    double l = (d * d + r * r - v.r * v.r) / (2 * d);
    double h = sqrt(r * r - l * l);
    Point tmp = p + (v.p - p).trunc(l);
    p1 = tmp + ((v.p - p).rotleft().trunc(h));
    p2 = tmp + ((v.p - p).rotright().trunc(h));
    if (rel == 2 || rel == 4) return 1;
    return 2;
  }
} cir[4];
Point nodes[20];
int V = 0, E = 0, C = 0;
Point ver[20];
int t = 0;
bool innodes(Point x) {
  for (int i = 0; i < V; i++)
    if (nodes[i] == x) return 1;
  return 0;
}
bool inver(Point x) {
  for (int i = 0; i < t; i++)
    if (ver[i] == x) return 1;
  return 0;
}
int fa[4];
bool vis[4];
int getf(int x) {
  if (fa[x] == x) return x;
  return fa[x] = getf(fa[x]);
}
void merge(int x, int y) {
  int f1 = getf(x), f2 = getf(y);
  if (f1 != f2) fa[f1] = f2;
}
int main() {
  int n;
  int x, y, r;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d%d", &x, &y, &r);
    cir[i] = circle(x, y, r);
  }
  if (n == 1) {
    printf("2");
    return 0;
  }
  if (n == 2) {
    if (cir[1].relationcircle(cir[2]) == 3)
      printf("4");
    else
      printf("3");
    return 0;
  }
  for (int i = 1; i <= 3; i++) fa[i] = i;
  Point a, b;
  for (int i = 1; i <= 3; i++) {
    t = 0;
    for (int j = 1; j <= 3; j++) {
      if (i == j) continue;
      int opt = cir[i].pointcrosscircle(cir[j], a, b);
      if (opt == 1) {
        if (!innodes(a)) nodes[V++] = a;
        if (!inver(a)) ver[t++] = a;
        merge(i, j);
      } else if (opt == 2) {
        if (!innodes(a)) nodes[V++] = a;
        if (!inver(a)) ver[t++] = a;
        if (!innodes(b)) nodes[V++] = b;
        if (!inver(b)) ver[t++] = b;
        merge(i, j);
      }
    }
    E += t;
  }
  for (int i = 1; i <= 3; i++) {
    if (!vis[getf(i)]) {
      vis[getf(i)] = true;
      C++;
    }
  }
  printf("%d\n", E - V + C + 1);
}
