#include <bits/stdc++.h>
using namespace std;
const int INF = 1.01e9;
bool eq(double A, double B) { return abs(A - B) < 1e-9; }
bool ls(double A, double B) { return A < B && !eq(A, B); }
bool le(double A, double B) { return A < B || eq(A, B); }
struct pt {
  double x, y;
  pt() {}
  pt(double xx, double yy) : x(xx), y(yy) {}
  pt operator+(pt A) { return pt(x + A.x, y + A.y); }
  pt operator-(pt A) { return pt(x - A.x, y - A.y); }
  pt operator*(double k) { return pt(x * k, y * k); }
  pt operator/(double k) {
    assert(abs(k) > 1e-20);
    return pt(x / k, y / k);
  }
  double operator*(pt A) { return x * A.y - y * A.x; }
  double operator%(pt A) { return x * A.x + y * A.y; }
  bool operator==(pt A) { return eq(x, A.x) && eq(y, A.y); }
  bool operator!=(pt A) { return !eq(x, A.x) || !eq(y, A.y); }
  bool operator<(pt A) const {
    return ls(x, A.x) || (eq(x, A.x) && ls(y, A.y));
  }
  double len() { return sqrt(x * x + y * y); }
  double len2() { return x * x + y * y; }
  pt rotate() { return pt(-y, x); }
  pt norm() { return (*this) / len(); }
  void read() { scanf("%lf%lf", &x, &y); }
};
vector<pt> intSS(pt A, double ra, pt B, double rb) {
  double d = (A - B).len();
  double ca = (ra * ra + d * d - rb * rb) / (2 * ra * d);
  vector<pt> res;
  if (ls(ca, -1)) return res;
  if (ls(1, ca)) return res;
  double si = sqrt(max(0.0, 1 - ca * ca));
  pt v = (B - A).norm();
  pt first = A + v * (ra * ca);
  pt u = v.rotate();
  if (eq(si, 0)) {
    res.push_back(first);
    return res;
  } else {
    res.push_back(first + u * (si * ra));
    res.push_back(first - u * (si * ra));
    return res;
  }
  assert(false);
}
int main() {
  int n;
  scanf("%d", &n);
  vector<pt> p(n);
  vector<double> r(n);
  for (int i = 0; i < n; i++) {
    p[i].read();
    scanf("%lf", &r[i]);
  }
  set<pt> total;
  vector<set<pt>> onC(n);
  int cntEdge = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      vector<pt> tmp = intSS(p[i], r[i], p[j], r[j]);
      for (auto A : tmp) {
        onC[i].insert(A);
        onC[j].insert(A);
        total.insert(A);
      }
      if (!tmp.empty()) {
        cntEdge++;
      }
    }
  }
  int cntComp = 1;
  if (n == 2 && cntEdge == 0) {
    cntComp = 2;
  }
  if (n == 3 && cntEdge == 0) {
    cntComp = 3;
  }
  if (n == 3 && cntEdge == 1) {
    cntComp = 2;
  }
  int edge = 0;
  int v = total.size();
  for (int i = 0; i < n; i++) {
    edge += onC[i].size();
  }
  int answer = edge + 2 - v + cntComp - 1;
  cout << answer << endl;
  return 0;
}
