#include <bits/stdc++.h>
using ll = long long;
enum : int { M = (int)1e9 + 7 };
enum : ll { MLL = (ll)1e18L + 9 };
using namespace std;
template <ostream& out = cout, class... T>
void prints(T&&...) {}
template <ostream& out = cout, class... T>
void printe(T&&...) {}
template <ostream& out = cout, class... T>
void printw(T&&...) {}
template <ostream& out = cout, class... T>
void printew(T&&...) {}
template <ostream& out = cout, class... T>
void printb(T&&...) {}
template <ostream& out = cout, class... T>
void printd(T&&...) {}
template <ostream& out = cout, class... T>
void printde(T&&...){};
template <class S, class T>
istream& operator>>(istream& in, pair<S, T>& p) {
  in >> p.first >> p.second;
  return in;
}
template <class T>
istream& operator>>(istream& in, vector<T>& v) {
  for (auto& e : v) {
    in >> e;
  }
  return in;
}
template <char d = ' ', class T>
ostream& operator<<(ostream& out, vector<T>& v) {
  for (auto& e : v) {
    out << e << d;
  }
  return out;
}
struct ld {
  using ntype = long double;
  static constexpr ntype eps = 1.0L / (1ll << 30);
  ntype num;
  ld(ntype num = 0) : num(num) {}
  operator ntype() const { return num; }
  ld operator+=(ntype n) { return num += n; }
  ld operator-=(ntype n) { return num -= n; }
  ld operator*=(ntype n) { return num *= n; }
  ld operator/=(ntype n) { return num /= n; }
  template <class T>
  bool operator<(T l) const {
    return num + eps < (ntype)l;
  }
  template <class T>
  bool operator>(T l) const {
    return num > (ntype)l + eps;
  }
  template <class T>
  bool operator<=(T l) const {
    return num < (ntype)l + eps;
  }
  template <class T>
  bool operator>=(T l) const {
    return num + eps > (ntype)l;
  }
  template <class T>
  bool operator==(T l) const {
    return (ntype)l <= num & num <= (ntype)l;
  }
  friend bool operator<(ntype n, ld l) { return ld(n) < l; }
  friend bool operator>(ntype n, ld l) { return ld(n) > l; }
  friend bool operator<=(ntype n, ld l) { return ld(n) <= l; }
  friend bool operator>=(ntype n, ld l) { return ld(n) >= l; }
  friend bool operator==(ntype n, ld l) { return ld(n) == l; }
};
istream& operator>>(istream& in, ld& l) {
  in >> l.num;
  return in;
}
ostream& operator<<(ostream& out, ld l) { return out << l.num; }
template <class T>
struct pyx_ {
  T y, x;
  pyx_() = default;
  pyx_(T y, T x) : y(y), x(x) {}
  T mdist(pyx_ p) { return abs(y - p.y) + abs(x - p.x); }
  T cdist(pyx_ p) { return max(abs(y - p.y), abs(x - p.x)); }
  T dist2(pyx_ p) { return (y - p.y) * (y - p.y) + (x - p.x) * (x - p.x); }
  pyx_ operator+(pyx_ p) const { return {y + p.y, x + p.x}; }
  pyx_ operator-(pyx_ p) const { return {y - p.y, x - p.x}; }
  pyx_ operator*(T c) const { return {y * c, x * c}; }
  pyx_ operator/(T c) const { return {y / c, x / c}; }
  friend pyx_ operator*(T c, pyx_ p) { return {p.y * c, p.x * c}; }
  pyx_ operator+=(pyx_ p) {
    y += p.y;
    x += p.x;
    return *this;
  }
  pyx_ operator-=(pyx_ p) {
    y -= p.y;
    x -= p.x;
    return *this;
  }
  pyx_ operator*=(pyx_ p) {
    y *= p.y;
    x *= p.x;
    return *this;
  }
  pyx_ operator/=(pyx_ p) {
    y /= p.y;
    x /= p.x;
    return *this;
  }
  bool operator<(pyx_ p) const { return tie(y, x) < tie(p.y, p.x); }
  pyx_ u(T d = 1) const { return {y - d, x}; }
  pyx_ d(T d = 1) const { return {y + d, x}; }
  pyx_ l(T d = 1) const { return {y, x - d}; }
  pyx_ r(T d = 1) const { return {y, x + d}; }
  pyx_ unit(T len = 1) const { return len * *this / sqrt(y * y + x * x); }
  pyx_ indiv(pyx_ p, T a = 1, T b = 1) const {
    return (*this * b + p * a) / (a + b);
  }
  pyx_ rot90() const { return {x, -y}; }
  template <class S>
  S& operator()(vector<vector<S>>& v) {
    return v[y][x];
  }
  ostream& operator>>(ostream& out) const {
    return out << '(' << y << ',' << x << ')';
  }
};
template <class T>
istream& operator>>(istream& in, pyx_<T>& p) {
  in >> p.x >> p.y;
  return in;
}
template <class T>
ostream& operator<<(ostream& out, const pyx_<T>& p) {
  return out << '(' << p.x << ',' << p.y << ')';
}
using pyx = pyx_<ld>;
struct Circle {
  using pyx = pyx_<ld>;
  pyx pos;
  ld r;
  Circle() = default;
  set<pyx> intersections(Circle& c) {
    ld d2 = pos.dist2(c.pos), d = sqrt(d2);
    if (d2 > (r + c.r) * (r + c.r) || d + min(r, c.r) < max(r, c.r)) {
      return {};
    }
    ld clen = (r * r - c.r * c.r + pos.dist2(c.pos)) / 2 / d;
    auto center = pos + (c.pos - pos).unit(clen);
    printd(pos, c.pos, clen, center);
    if (d2 == (r + c.r) * (r + c.r)) {
      return {center};
    }
    auto v = (c.pos - pos).unit(sqrt(r * r - clen * clen)).rot90();
    return {center + v, center - v};
  }
};
istream& operator>>(istream& in, Circle& c) {
  in >> c.pos >> c.r;
  return in;
}
ostream& operator<<(ostream& out, const Circle& e) {
  return out << '[' << e.pos << ':' << e.r << ']';
}
struct UnionFind {
  vector<int> elems;
  UnionFind(int n) : elems(n) {
    for (int i = 0; i < n; i++) {
      elems[i] = i;
    }
  }
  bool same(int a, int b) { return parent(a) == parent(b); }
  void unite(int a, int b) { elems[parent(a)] = parent(b); }
  int parent(int a) {
    if (a == elems[a]) {
      return a;
    }
    return elems[a] = parent(elems[a]);
  }
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<Circle> cs(n);
  cin >> cs;
  printd(cs);
  set<pyx> vs;
  UnionFind uf(n);
  int e = 0, c = 0;
  for (int i = 0; i < n; i++) {
    set<pyx> vs2;
    for (int j = 0; j < i; j++) {
      auto ps = cs[i].intersections(cs[j]);
      if (ps.size()) {
        uf.unite(i, j);
      }
      printd(ps);
      vs2.insert(ps.begin(), ps.end());
    }
    int diff = -vs.size();
    vs.insert(vs2.begin(), vs2.end());
    diff += vs.size();
    e += vs2.size() + diff;
  }
  for (int i = 0; i < n; i++) {
    c += uf.elems[i] == i;
  }
  printd(e, vs, c);
  cout << e - vs.size() + c + 1 << '\n';
}
