#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
struct point {
  double x, y;
  point(double _x = 0, double _y = 0) : x(_x), y(_y) {}
} s[20];
bool operator<(point x, point y) {
  return fabs(x.x - y.x) < eps ? x.y < y.y : x.x < y.x;
}
inline point operator+(point x, point y) { return point(x.x + y.x, x.y + y.y); }
inline point operator-(point x, point y) { return point(x.x - y.x, x.y - y.y); }
inline point operator*(point x, double y) { return point(x.x * y, x.y * y); }
inline point operator/(point x, double y) { return point(x.x / y, x.y / y); }
inline point rot90(point x) { return point(-x.y, x.x); }
inline double dot(point x, point y) { return x.x * y.x + x.y * y.y; }
inline double det(point x, point y) { return x.x * y.x - x.y * y.y; }
inline double cross(point x, point y) { return x.x * y.y - x.y * y.x; }
inline double sqr(double x) { return x * x; }
inline double d(point x, point y) {
  return sqrt(sqr(x.x - y.x) + sqr(x.y - y.y));
}
inline point mid(point x, point y) {
  return point((x.x + y.x) / 2., (x.y + y.y) / 2.);
}
struct circle {
  point o;
  double r;
  circle(point _o = point(0, 0), double _r = 0) : o(_o), r(_r) {}
} a[4];
long long n, e, num, tot, v;
inline void cir_cut(circle x, circle y) {
  double D = d(x.o, y.o);
  if (D - x.r - y.r > eps || D - fabs(x.r - y.r) < -eps) return;
  ++num;
  double dt = (x.r * x.r - y.r * y.r) / D, d1 = (D + dt) / 2.;
  point dir = (y.o - x.o) / D, pcrs = x.o + dir * d1;
  dt = sqrt(max(0.0, x.r * x.r - d1 * d1)), dir = rot90(dir);
  s[++tot] = pcrs + dir * dt;
  s[++tot] = pcrs - dir * dt;
}
int main() {
  scanf("%lld", &n);
  for (long long i = 1; i <= n; ++i)
    scanf("%lf%lf%lf", &a[i].o.x, &a[i].o.y, &a[i].r);
  for (long long i = 1; i <= n; ++i)
    for (long long j = i + 1; j <= n; ++j) cir_cut(a[i], a[j]);
  sort(s + 1, s + 1 + tot);
  if (!tot) return printf("%lld", n + 1), 0;
  v = 1;
  for (long long i = 2; i <= tot; ++i)
    if (fabs(s[i].x - s[i - 1].x) > eps || fabs(s[i].y - s[i - 1].y) > eps)
      s[++v] = s[i];
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; j <= v; ++j) {
      if (fabs(d(a[i].o, s[j]) - a[i].r) < eps) ++e;
    }
  if (n == 2)
    printf("%lld", e - v + 2);
  else
    printf("%lld", e - v + (num > 1 ? 1 : 2) + 1);
  return 0;
}
