#include <bits/stdc++.h>
using namespace std;
long double eps = 1e-12;
bool eq(long double a, long double b) { return fabs(b - a) < eps; }
struct pointd {
  long double x, y;
  pointd() {
    x = 0;
    y = 0;
  }
  pointd(long double xx, long double yy) {
    x = xx;
    y = yy;
  };
  pointd operator+(pointd b) { return pointd(x + b.x, y + b.y); }
  pointd operator-(pointd b) { return pointd(x - b.x, y - b.y); }
  pointd operator/(long double s) { return pointd(x / s, y / s); }
  long double operator*(pointd b) { return x * b.x + y * b.y; }
  pointd operator*(long double s) { return pointd(x * s, y * s); }
  long double operator^(pointd b) { return x * b.y - y * b.x; }
  bool operator==(const pointd b) const {
    return eq(this->x, b.x) && eq(this->y, b.y);
  }
  bool operator<(const pointd b) const {
    return !(*this == b) &&
           (this->x < b.x || (eq(this->x, b.x) && this->y < b.y));
  }
};
long double distsq(pointd a, pointd b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
long double dist(pointd a, pointd b) { return sqrt(distsq(a, b)); }
long double norm(pointd a) { return dist(a, {0, 0}); }
vector<pointd> CircleCircleIntersection(pointd a, int r1, pointd b, int r2) {
  long double d = dist(a, b);
  if (eq(d, r1 + r2)) {
    pointd z = b - a;
    z = z / norm(z) * r1 + a;
    return {z};
  }
  if (eq(r1, d + r2)) {
    pointd z = (b - a);
    z = z * (r1 / d);
    return {a + z};
  }
  if (eq(r2, r1 + d)) {
    pointd z = (a - b);
    z = z * (r2 / d);
    return {b + z};
  }
  if (d > r1 + r2) return {};
  if (r1 > r2 + d || r2 > r1 + d) return {};
  long double l = (r2 * r2 - r1 * r1 + distsq(a, b)) / (2 * d);
  long double h = sqrt(r2 * r2 - l * l);
  pointd z = a - b;
  z = z / norm(z);
  pointd zz(-z.y, z.x);
  pointd A = b + z * l + zz * h;
  pointd B = b + z * l - zz * h;
  return {A, B};
}
pointd p[3];
pointd q[2];
int r[3];
int n;
int f[3];
int s[3];
int find(int x) { return f[x] == x ? f[x] : f[x] = find(f[x]); }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].x >> p[i].y;
    cin >> r[i];
  }
  if (n == 1) {
    cout << 2 << endl;
    return 0;
  }
  if (n == 2) {
    vector<pointd> res = CircleCircleIntersection(p[0], r[0], p[1], r[1]);
    if (res.size() == 2) {
      cout << 4 << endl;
    } else
      cout << 3 << endl;
    return 0;
  }
  for (int i = 0; i < 3; i++) f[i] = i, s[i] = 1;
  int e = 0, v = 0, c = 0;
  set<pointd> inter;
  for (int i = 0; i < 3; i++) {
    for (int j = i + 1; j < 3; j++) {
      vector<pointd> v = CircleCircleIntersection(p[i], r[i], p[j], r[j]);
      if (v.size()) {
        for (auto z : v) inter.insert(z);
        int pi = find(i);
        int pj = find(j);
        f[pi] = pj;
        s[pj] += s[pi];
      }
    }
  }
  set<int> cc = {find(0), find(1), find(2)};
  c = cc.size();
  v = inter.size();
  for (int i = 0; i < 3; i++) {
    if (find(i) == i && s[i] == 1) {
      e++;
      v++;
    } else {
      int onb = 0;
      for (auto z : inter) {
        if (eq((z.x - p[i].x) * (z.x - p[i].x) +
                   (z.y - p[i].y) * (z.y - p[i].y),
               r[i] * r[i]))
          onb++;
      }
      e += onb;
    }
  }
  cout << (e + c - v + 1) << endl;
  return 0;
}
