#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-6;
int sgn(long double x) {
  if (fabs(x) < eps) return 0;
  return x > 0 ? 1 : -1;
}
struct Point {
  long double x, y;
  Point(long double xp = 0, long double yp = 0) : x(xp), y(yp) {}
  Point operator+(const Point& rhs) const {
    return Point(x + rhs.x, y + rhs.y);
  }
  Point operator-(const Point& rhs) const {
    return Point(x - rhs.x, y - rhs.y);
  }
  Point operator*(const long double& k) const { return Point(x * k, y * k); }
  Point operator/(const long double& k) const { return Point(x / k, y / k); }
  bool operator<(const Point& rhs) const {
    return x < rhs.x || (x == rhs.x && y < rhs.y);
  }
  bool operator==(const Point& rhs) const {
    return sgn(x - rhs.x) == 0 && sgn(y - rhs.y) == 0;
  }
  Point turn(long double rad) {
    return Point(x * cos(rad) - y * sin(rad), x * sin(rad) + y * cos(rad));
  }
  Point turn90() { return Point(-y, x); }
};
long double dot(Point x, Point y) { return x.x * y.x + x.y * y.y; }
long double length(Point x) { return sqrt(dot(x, x)); }
long double dist2(Point A, Point B) { return dot(A - B, A - B); }
long double cross(Point A, Point B) { return A.x * B.y - A.y * B.x; }
long double angle(Point A, Point B) {
  return acos(dot(A, B) / length(A) / length(B));
}
struct Circle {
  Point c;
  long double r;
};
long double ppdis(Point a, Point b) { return sqrt(dot(a - b, a - b)); }
long double pldis(Point p, Point l1, Point l2) {
  return fabs(cross(l1 - p, l2 - p)) / ppdis(l1, l2);
}
long double sqr(long double x) { return x * x; }
bool OnCircle(Point p, Circle c) {
  return sgn(sqr(p.x - c.c.x) + sqr(p.y - c.c.y) - sqr(c.r)) == 0;
}
bool cir_line(Point ct, long double r, Point l1, Point l2, Point& p1,
              Point& p2) {
  if (sgn(pldis(ct, l1, l2) - r) > 0) return false;
  long double a1, a2, b1, b2, A, B, C, t1, t2;
  a1 = l2.x - l1.x;
  a2 = l2.y - l1.y;
  b1 = l1.x - ct.x;
  b2 = l1.y - ct.y;
  A = a1 * a1 + a2 * a2;
  B = (a1 * b1 + a2 * b2) * 2;
  C = b1 * b1 + b2 * b2 - r * r;
  long double delta = fabs(B * B - 4.0 * A * C);
  t1 = (-B - sqrt(delta)) / 2.0 / A;
  t2 = (-B + sqrt(delta)) / 2.0 / A;
  p1.x = l1.x + a1 * t1;
  p1.y = l1.y + a2 * t1;
  p2.x = l1.x + a1 * t2;
  p2.y = l1.y + a2 * t2;
  return true;
}
bool cir_cir(Point c1, long double r1, Point c2, long double r2, Point& p1,
             Point& p2) {
  long double d = ppdis(c1, c2);
  if (sgn(d - r1 - r2) > 0 || sgn(d - fabs(r1 - r2)) < 0) return false;
  Point u, v;
  long double t = (1 + (r1 * r1 - r2 * r2) / ppdis(c1, c2) / ppdis(c1, c2)) / 2;
  u.x = c1.x + (c2.x - c1.x) * t;
  u.y = c1.y + (c2.y - c1.y) * t;
  v.x = u.x + c1.y - c2.y;
  v.y = u.y + c2.x - c1.x;
  cir_line(c1, r1, u, v, p1, p2);
  return true;
}
vector<Point> getCircleIntersection(Circle C1, Circle C2) {
  Point pt1, pt2;
  if (!cir_cir(C1.c, C1.r, C2.c, C2.r, pt1, pt2)) return vector<Point>();
  return vector<Point>({pt1, pt2});
}
Circle c[3];
int n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%Lf%Lf%Lf", &c[i].c.x, &c[i].c.y, &c[i].r);
  vector<Point> pts;
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j) {
      auto g = getCircleIntersection(c[i], c[j]);
      for (auto p : g) pts.push_back(p);
    }
  sort(pts.begin(), pts.end());
  pts.erase(unique(pts.begin(), pts.end()), pts.end());
  int v = (int)pts.size(), e = 0, C = 0, hasone = 0;
  for (int i = 0; i < n; ++i) {
    int cc = 0;
    for (auto g : pts)
      if (OnCircle(g, c[i])) cc++;
    e += max(cc, 2);
    if (cc < 2) v += 2 - cc;
    if (cc == 0)
      C++;
    else
      hasone = 1;
  }
  printf("%d\n", 1 + hasone + C - v + e);
  return 0;
}
