#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int INF = 0x3f3f3f3f;
const long long INF64 = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-7;
template <class T>
T gcd(T a, T b) {
  if (!b) return a;
  return gcd(b, a % b);
}
const int maxn = 5;
double x[maxn], y[maxn], r[maxn];
int vis[maxn];
int n;
double dis(int u, int v) {
  return ((x[u] - x[v]) * (x[u] - x[v])) + ((y[u] - y[v]) * (y[u] - y[v]));
}
bool its(int u, int v) {
  return dis(u, v) <= ((r[u] + r[v]) * (r[u] + r[v])) &&
         dis(u, v) >= ((r[u] - r[v]) * (r[u] - r[v]));
}
struct Point {
  double x, y;
  bool operator==(const Point& rbs) const {
    return fabs(x - rbs.x) < eps && fabs(y - rbs.y) < eps;
  }
  Point() {}
  Point(double _x, double _y) : x(_x), y(_y) {}
} p[maxn * maxn * 2];
bool cmp(Point u, Point v) {
  return fabs(u.x - v.x) < eps ? u.y < v.y : u.x < v.x;
}
int main() {
  int E = 0, V = 0, C = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf%lf", &x[i], &y[i], &r[i]);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j && its(i, j)) break;
      if (j == n - 1) C++;
    }
  }
  if (C != n) C++;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (its(i, j)) {
        double d = sqrt(dis(i, j));
        double a = atan2(y[j] - y[i], x[j] - x[i]);
        double da = acos((r[i] * r[i] + d * d - r[j] * r[j]) / (2 * r[i] * d));
        Point p1 = Point(x[i] + r[i] * cos(a - da), y[i] + r[i] * sin(a - da)),
              p2 = Point(x[i] + r[i] * cos(a + da), y[i] + r[i] * sin(a + da));
        p[cnt++] = p1, p[cnt++] = p2;
      }
    }
  }
  sort(p, p + cnt, cmp);
  V = unique(p, p + cnt) - p;
  for (int i = 0; i < V; i++) {
    for (int j = 0; j < n; j++) {
      if (fabs(((p[i].x - x[j]) * (p[i].x - x[j])) +
               ((p[i].y - y[j]) * (p[i].y - y[j])) - ((r[j]) * (r[j]))) < eps)
        E++;
    }
  }
  printf("%d\n", E - V + C + 1);
  return 0;
}
