#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1.);
const long double eps = 1e-10;
template <class T>
T rd() {
  bool f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = 0;
  T x = 0;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - 48;
  return f ? x : -x;
}
int sgn(long double x) { return x < -eps ? -1 : x > eps; }
bool le(long double x, long double y) { return sgn(y - x) != -1; }
bool lt(long double x, long double y) { return sgn(y - x) == 1; }
bool ge(long double x, long double y) { return sgn(x - y) != -1; }
bool gt(long double x, long double y) { return sgn(x - y) == 1; }
bool eq(long double x, long double y) { return sgn(x - y) == 0; }
struct Vector;
struct Vector {
  long double x, y;
  Vector(long double _x = 0, long double _y = 0) : x(_x), y(_y) {}
  friend Vector operator+(const Vector &a, const Vector &b) {
    return Vector(a.x + b.x, a.y + b.y);
  }
  friend Vector operator-(const Vector &a, const Vector &b) {
    return Vector(a.x - b.x, a.y - b.y);
  }
  friend Vector operator*(const Vector &a, const long double k) {
    return Vector(a.x * k, a.y * k);
  }
  friend Vector operator*(const long double k, const Vector &a) {
    return Vector(a.x * k, a.y * k);
  }
  friend Vector operator/(const Vector &a, const long double k) {
    return Vector(a.x / k, a.y / k);
  }
  Vector operator-() { return Vector(-x, -y); }
  friend bool operator<(const Vector &a, const Vector &b) {
    return eq(a.x, b.x) ? lt(a.y, b.y) : lt(a.x, b.x);
  }
  friend bool operator==(const Vector &a, const Vector &b) {
    return eq(a.x, b.x) && eq(a.y, b.y);
  }
  long double len() const { return sqrt(x * x + y * y); }
  Vector unit() const { return *this / len(); }
  Vector normal() const { return Vector(-y, x); }
};
long double dot(const Vector &a, const Vector &b) {
  return a.x * b.x + a.y * b.y;
}
long double det(const Vector &a, const Vector &b) {
  return a.x * b.y - a.y * b.x;
}
long double p_dis_p(const Vector &, const Vector &);
Vector p_middle_p(const Vector &, const Vector &);
struct Circle {
  Vector o;
  long double r;
  Circle() {}
  Circle(Vector _o, long double _r) : o(_o), r(_r) {}
  Circle(Vector a, Vector b) {
    o = p_middle_p(a, b);
    r = p_dis_p(a, o);
  }
  bool chk_p(const Vector &p) const { return eq(p_dis_p(p, o), r); }
};
long double p_dis_p(const Vector &a, const Vector &b) { return (b - a).len(); }
int c_relative_c(Circle a, Circle b) {
  if (lt(a.r, b.r)) swap(a, b);
  long double d = p_dis_p(a.o, b.o);
  if (gt(d, a.r + b.r)) return 2;
  if (eq(d, a.r + b.r)) return 1;
  if (eq(d, a.r - b.r)) return -1;
  if (lt(d, a.r - b.r)) return -2;
  return 0;
}
template <class T1, class T2>
vector<Vector> c_intersection_c(T1 a, T2 b) {
  if (lt(a.r, b.r)) swap(a, b);
  vector<Vector> S;
  long double d = p_dis_p(a.o, b.o);
  int kd = c_relative_c(a, b);
  if (abs(kd) == 2)
    return S;
  else if (abs(kd) == 1) {
    if (1) {
      Vector _ = a.o + (b.o - a.o).unit() * a.r;
      if (a.chk_p(_) && b.chk_p(_)) S.push_back(_);
    };
    return S;
  }
  long double x = fabs((d + (a.r * a.r - b.r * b.r) / d) / 2);
  long double z = sqrt(a.r * a.r - x * x);
  Vector u = (b.o - a.o).unit(), v = u.normal();
  Vector c = a.o + u * x;
  if (1) {
    Vector _ = c + v * z;
    if (a.chk_p(_) && b.chk_p(_)) S.push_back(_);
  };
  if (1) {
    Vector _ = c - v * z;
    if (a.chk_p(_) && b.chk_p(_)) S.push_back(_);
  };
  return S;
}
int n;
Circle c[5];
vector<Vector> S;
vector<pair<Vector, int> > p[5];
int dsu[103];
int find(int x) { return dsu[x] != x ? dsu[x] = find(dsu[x]) : x; }
void merge(int x, int y) {
  if (find(x) != find(y)) dsu[find(x)] = find(y);
}
Vector center;
bool cmp(const pair<Vector, int> x, const pair<Vector, int> y) {
  Vector u = x.first - center, v = y.first - center;
  return atan2(u.y, u.x) < atan2(v.y, v.x);
}
int main() {
  n = rd<int>();
  for (int i = (1), _ = (n); i <= _; ++i) {
    int x = rd<int>(), y = rd<int>(), r = rd<int>();
    c[i] = Circle(Vector(x, y), r);
  }
  for (int i = (1), _ = (n); i <= _; ++i)
    for (int j = (i + 1), _ = (n); j <= _; ++j) {
      vector<Vector> join = c_intersection_c(c[i], c[j]);
      for (__typeof(join.begin()) it = join.begin(); it != join.end(); ++it)
        S.push_back(*it);
    }
  sort(S.begin(), S.end());
  S.erase(unique(S.begin(), S.end()), S.end());
  for (int i = (1), _ = (n); i <= _; ++i)
    for (int j = (0), _ = (S.size()); j < _; ++j)
      if (c[i].chk_p(S[j])) p[i].push_back((pair<Vector, int>){S[j], j});
  int v = S.size(), e = 0, cp = v;
  for (int i = (0), _ = (v); i < _; ++i) dsu[i] = i;
  for (int i = (1), _ = (n); i <= _; ++i) {
    if (p[i].empty())
      ++cp;
    else {
      e += p[i].size();
      center = c[i].o;
      sort(p[i].begin(), p[i].end(), cmp);
      for (int j = (1), _ = (p[i].size()); j < _; ++j)
        merge(p[i][j].second, p[i][j - 1].second);
    }
  }
  for (int i = (0), _ = (v); i < _; ++i)
    if (find(i) != i) --cp;
  printf("%d\n", 1 + cp - v + e);
  return 0;
}
