#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long double EPS = 1e-9;
long double sqr(long double first) { return first * first; }
long double dist(pair<long double, long double> u,
                 pair<long double, long double> v) {
  return sqrt(sqr(u.first - v.first) + sqr(u.second - v.second));
}
struct Circle {
  pair<long double, long double> c;
  long double r;
  Circle() {}
  Circle(pair<long double, long double> c, long double r) : c(c), r(r) {}
} a[3];
bool isAtTheCircle(Circle q, pair<long double, long double> p) {
  return abs(q.r - dist(p, q.c)) < EPS;
}
int n;
bool intersects(Circle u, Circle v) { return dist(u.c, v.c) <= u.r + v.r; }
void normalize(long double &vx, long double &vy, long double dist) {
  long double length = sqrt(sqr(vx) + sqr(vy));
  vx *= dist / length;
  vy *= dist / length;
}
vector<pair<long double, long double> > getIntersections(long double r,
                                                         long double a,
                                                         long double b,
                                                         long double c) {
  long double distToLine = abs(c) / sqrt(sqr(a) + sqr(b));
  long double x0 = -a * c / (sqr(a) + sqr(b));
  long double y0 = -b * c / (sqr(a) + sqr(b));
  vector<pair<long double, long double> > res;
  if (abs(distToLine - r) < EPS) {
    res.push_back(pair<long double, long double>(x0, y0));
    return res;
  }
  if (distToLine > r) {
    return res;
  }
  long double d = sqrt(sqr(r) - sqr(distToLine));
  long double vx = -b, vy = a;
  normalize(vx, vy, d);
  res.push_back(pair<long double, long double>(x0 + vx, y0 + vy));
  res.push_back(pair<long double, long double>(x0 - vx, y0 - vy));
  return res;
}
vector<pair<long double, long double> > getIntersections(Circle u, Circle v) {
  vector<pair<long double, long double> > res = getIntersections(
      u.r, -2 * (v.c.first - u.c.first), -2 * (v.c.second - u.c.second),
      sqr(dist(u.c, v.c)) + sqr(u.r) - sqr(v.r));
  for (auto &p : res) {
    p.first += u.c.first;
    p.second += u.c.second;
  }
  return res;
}
int dsu[3], used[3], cnt[3];
int f(int first) {
  return dsu[first] == first ? first : dsu[first] = f(dsu[first]);
}
bool isInList(pair<long double, long double> p,
              vector<pair<long double, long double> > v) {
  for (auto q : v) {
    if (abs(q.first - p.first) < EPS && abs(q.second - p.second) < EPS) {
      return true;
    }
  }
  return false;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].c.first >> a[i].c.second >> a[i].r;
    dsu[i] = i;
  }
  int E = 0, V = 0, C = 0;
  vector<pair<long double, long double> > intersections(0);
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      vector<pair<long double, long double> > cur =
          getIntersections(a[i], a[j]);
      if (cur.size()) {
        dsu[f(i)] = dsu[f(j)];
      }
      for (auto p : cur) {
        if (!isInList(p, intersections)) {
          intersections.push_back(p);
        }
      }
    }
  }
  V = intersections.size();
  for (int i = 0; i < n; i++) {
    for (auto p : intersections) {
      if (isAtTheCircle(a[i], p)) {
        cnt[i]++;
      }
    }
    E += cnt[i];
  }
  for (int i = 0; i < n; i++) {
    if (!used[f(i)]) C++;
    used[f(i)] = 1;
  }
  cout << E - V + C + 1;
}
