#include <bits/stdc++.h>
using namespace std;
int n, k;
string s;
struct point {
  double x, y;
  point() {}
  point(const point& a) { x = a.x, y = a.y; }
  point(double _x, double _y) {
    x = _x;
    y = _y;
  }
  point operator-(point& a) {
    point r(*this);
    r.x -= a.x, r.y -= a.y;
    return r;
  }
  point operator+(point& a) {
    point r(*this);
    r.x += a.x, r.y += a.y;
    return r;
  }
  point operator*(double val) {
    point r(*this);
    r.x *= val, r.y *= val;
    return r;
  }
  point operator/(double val) {
    point r(*this);
    r.x /= val, r.y /= val;
    return r;
  }
  bool operator<(const point& a) const {
    if (fabs(x - a.x) < 1e-8) return y < a.y;
    return x < a.x;
  }
  void rotate(long double alfa) {
    long double cx = x;
    x = x * cos(alfa) - y * sin(alfa);
    y = y * cos(alfa) + cx * sin(alfa);
  }
};
template <class T>
ostream& operator<<(ostream& out, vector<T> v) {
  out << v.size() << '\n';
  for (auto e : v) out << e << ' ';
  return out;
}
ostream& operator<<(ostream& out, point p) { return out << p.x << ' ' << p.y; }
struct line {
  double m, n;
  line(point A, point B) {
    m = (A.y - B.y) / (A.x - B.x);
    n = A.y - m * A.x;
  }
  line(point A, double _m) {
    m = _m;
    n = A.y - m * A.x;
  }
  line(double _m, double _n) {
    m = _m;
    n = _n;
  }
  point intersect(line l) {
    point O;
    O.x = (l.n - n) / (m - l.m);
    O.y = m * O.x + n;
    return O;
  }
};
double dx[] = {-1, -1, 1, 1};
double dy[] = {-1, 1, 1, -1};
long double dist(point a, point b) {
  long double X = a.x - b.x;
  long double Y = a.y - b.y;
  return sqrt(X * X + Y * Y);
}
struct circle {
  point o;
  double r;
  circle() {}
  circle(point a, point b, point c) {
    point mab = (a + b) / 2;
    point mbc = (c + b) / 2;
    line ab(a, b), bc(b, c);
    line ab1(mab, -1.0 / ab.m);
    line bc1(mbc, -1.0 / bc.m);
    o = ab1.intersect(bc1);
    r = dist(o, a);
  }
  vector<point> intersect(circle c) {
    vector<point> ans;
    point p1;
    if (dist(o, c.o) > r + c.r) return ans;
    circle re = c;
    re.o = re.o - o;
    double angle = atan2(re.o.y, re.o.x);
    double cc = dist(o, c.o);
    double p = (cc + r + c.r) / 2.;
    double area = sqrt(p * (p - r) * (p - c.r) * (p - cc));
    double h = 2.0 * area / cc;
    double alfa1 = asin(h / r), an1;
    an1 = angle + acos(-1) / 2.0 - alfa1;
    for (int i = 0; i < 4; i++) {
      p1.x = r * sin(an1) * dx[i];
      p1.y = r * cos(an1) * dy[i];
      if (fabs(dist(p1, re.o) - re.r) < 1e-8) ans.push_back(p1 + o);
    }
    an1 = angle + acos(-1) / 2.0 + alfa1;
    for (int i = 0; i < 4; i++) {
      p1.x = r * sin(an1) * dx[i];
      p1.y = r * cos(an1) * dy[i];
      if (fabs(dist(p1, re.o) - re.r) < 1e-8) ans.push_back(p1 + o);
    }
    cerr << "ans"
            ": "
         << ans << "\n";
    return ans;
  }
};
struct seg {
  point a, b;
};
istream& operator>>(istream& in, point& p) { return in >> p.x >> p.y; }
istream& operator>>(istream& in, circle& c) { return in >> c.o >> c.r; }
istream& operator>>(istream& in, seg& s) { return in >> s.a >> s.b; }
long double area(point a, point b, point c) {
  return a.x * b.y + b.x * c.y + c.x * a.y - a.y * b.x - b.y * c.x - c.y * a.x;
  return (b.x - a.x) * (c.y - a.y) - (c.x - a.x) * (b.y - a.y);
}
bool isObtouseAngle(point A, point B, point C) {
  double a = dist(B, C);
  double b = dist(A, C);
  double c = dist(B, A);
  a *= a;
  b *= b;
  c *= c;
  if (b + c < a) return true;
  return false;
}
double dist(point p, seg s) {
  if (isObtouseAngle(s.a, s.b, p) || dist(s.a, s.b) <= 1e-8 ||
      isObtouseAngle(s.b, s.a, p))
    return min(dist(p, s.a), dist(p, s.b));
  return fabs(area(p, s.a, s.b)) / dist(s.a, s.b);
}
bool checkInt(seg a, seg b) {
  if (area(a.a, a.b, b.a) * area(a.a, a.b, b.b) >= 1e-8) return false;
  if (area(b.a, b.b, a.a) * area(b.a, b.b, a.b) >= 1e-8) return false;
  return true;
}
circle c[550];
map<pair<long long, long long>, int> m;
set<double> xs, ys;
point vp[550];
int get_p(point p) {
  long double itx = 1e9 * p.x + 0.5;
  long double ity = 1e9 * p.y + 0.5;
  long long X = itx;
  long long Y = ity;
  if (m.count({X, Y}) == 0) m[{X, Y}] = m.size();
  int res = m[{X, Y}];
  return m[{X, Y}];
}
vector<int> v[550];
int use[550], C, V, E;
void dfs(int k) {
  use[k] = 1;
  for (auto i : v[k])
    if (!use[i]) dfs(i);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> c[i];
  for (int i = 1; i <= n; i++) {
    cerr << "i"
            ": "
         << i << "\n";
    set<int> inters;
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      auto in = c[i].intersect(c[j]);
      for (auto p : in) {
        int ind = get_p(p);
        inters.insert(ind);
      }
    }
    for (auto i : inters) {
      if (i != *inters.begin())
        v[*inters.begin()].push_back(i), v[i].push_back(*inters.begin());
    }
    cerr << "inters.size()"
            ": "
         << inters.size() << "\n";
    E += inters.size();
    if (inters.size() == 0) C++;
  }
  V = m.size();
  for (int i = 1; i <= V; i++) {
    if (!use[i]) dfs(i), C++;
  }
  cerr << "V"
          ": "
       << V << "\n";
  cerr << "E"
          ": "
       << E << "\n";
  cerr << "C"
          ": "
       << C << "\n";
  cout << E - V + C + 1;
}
