#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-12;
const long double PI = acos(-1.0);
inline int sgn(double x) {
  if (fabs(x) < eps) return 0;
  return x > 0 ? 1 : -1;
}
inline long double sqr(long double x) { return x * x; }
struct Point {
  long double x, y;
  Point() {}
  Point(double _x, double _y) : x(_x), y(_y) {}
  long double norm() { return sqrt(x * x + y * y); }
  friend Point operator+(const Point &a, const Point &b) {
    return Point(a.x + b.x, a.y + b.y);
  }
  friend Point operator-(const Point &a, const Point &b) {
    return Point(a.x - b.x, a.y - b.y);
  }
  friend Point operator*(const Point &a, const long double &b) {
    return Point(a.x * b, a.y * b);
  }
  friend Point operator/(const Point &a, const long double &b) {
    return Point(a.x / b, a.y / b);
  }
  friend bool operator==(const Point &a, const Point &b) {
    return fabs(a.x - b.x) < eps && fabs(a.y - b.y) < eps;
  }
  bool operator<(const Point &a) const {
    return fabs(x - a.x) < eps ? y < a.y : x < a.x;
  }
  Point rot90() const { return Point(-y, x); }
};
long double angle(Point a) { return atan2(a.y, a.x); }
long double Dot(const Point &a, const Point &b) {
  return a.x * b.x + a.y * b.y;
}
long double Det(const Point &a, const Point &b) {
  return a.x * b.y - a.y * b.x;
}
long double dist(const Point &a, const Point &b) { return (a - b).norm(); }
Point RC_to_PC(Point a) {
  return Point(sqrt((a.x * a.x + a.y * a.y)), atan2(a.y, a.x));
}
Point PC_to_RC(Point a) { return Point(a.x * cos(a.y), a.x * sin(a.y)); }
struct Circle {
  Point o;
  long double r;
  Circle() {}
  Circle(Point _o, long double _r) : o(_o), r(_r) {}
  Point point(long double a) {
    return Point(o.x + cos(a) * r, o.y + sin(a) * r);
  }
};
int getCircleCircleIntersection(Circle &c1, Circle &c2, vector<Point> &sol) {
  long double d = (c1.o - c2.o).norm();
  if (sgn(d) == 0) {
    if (sgn(c1.r - c2.r) == 0) return -1;
    return 0;
  }
  if (sgn(c1.r + c2.r - d) < 0) return 0;
  if (sgn(fabs(c1.r - c2.r) - d) > 0) return 0;
  long double a = angle(c2.o - c1.o);
  long double da = acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2 * c1.r * d));
  Point p1 = c1.point(a - da), p2 = c1.point(a + da);
  sol.push_back(p1);
  if (p1 == p2) return 1;
  sol.push_back(p2);
  return 2;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<Circle> a(n);
  for (int i = 0; i < n; i++) cin >> a[i].o.x >> a[i].o.y >> a[i].r;
  int e = 0, v = 0, ct = n;
  vector<Point> b;
  vector<int> bcj(n);
  iota(bcj.begin(), bcj.end(), 0);
  function<int(int)> gr = [&](int k) {
    return bcj[k] == k ? k : bcj[k] = gr(bcj[k]);
  };
  for (int i = 0; i < n; i++) {
    vector<Point> tmp1;
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      vector<Point> tmp2;
      int num = getCircleCircleIntersection(a[i], a[j], tmp2);
      if (num != 0) {
        int ri = gr(i), rj = gr(j);
        if (ri != rj) {
          bcj[ri] = rj;
          ct--;
        }
      }
      tmp1.insert(tmp1.end(), tmp2.begin(), tmp2.end());
      b.insert(b.end(), tmp2.begin(), tmp2.end());
    }
    sort(tmp1.begin(), tmp1.end());
    e += unique(tmp1.begin(), tmp1.end()) - tmp1.begin();
  }
  sort(b.begin(), b.end());
  v = unique(b.begin(), b.end()) - b.begin();
  cout << e - v + ct + 1 << endl;
  return 0;
}
