#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
struct DSU {
  struct node {
    int p;
    int s;
  };
  vector<node> nodes;
  DSU(int n) {
    nodes.resize(n);
    for (int i = 0; i < n; i++) {
      nodes[i].p = i;
      nodes[i].s = 1;
    }
  }
  node& operator[](int index) { return nodes[index]; }
  int size(int v) { return nodes[find(v)].s; }
  int find(int v) {
    if (nodes[v].p == v) return v;
    return nodes[v].p = find(nodes[v].p);
  }
  bool merge(int a, int b) {
    a = find(a);
    b = find(b);
    if (a == b) return false;
    if (nodes[a].s < nodes[b].s) swap(a, b);
    nodes[b].p = a;
    nodes[a].s += nodes[b].s;
    return true;
  }
};
template <class T>
int sgn(T x) {
  return (x > 0) - (x < 0);
}
template <class T>
struct TPoint {
  T x, y;
  static constexpr T eps = static_cast<T>(1e-8);
  explicit TPoint(T x = 0, T y = 0) : x(x), y(y) {}
  bool operator<(TPoint p) const {
    return fabs(x - p.x) < eps ? y < p.y : x < p.x;
  }
  bool operator==(TPoint p) const {
    return abs(x - p.x) <= eps && abs(y - p.y) <= eps;
  }
  TPoint operator+(TPoint p) const { return TPoint(x + p.x, y + p.y); }
  TPoint operator-(TPoint p) const { return TPoint(x - p.x, y - p.y); }
  TPoint operator*(T d) const { return TPoint(x * d, y * d); }
  TPoint operator/(T d) const { return TPoint(x / d, y / d); }
  T dot(TPoint p) const { return x * p.x + y * p.y; }
  T cross(TPoint p) const { return x * p.y - y * p.x; }
  T cross(TPoint a, TPoint b) const { return (a - *this).cross(b - *this); }
  T dist2() const { return x * x + y * y; }
  double dist() const { return sqrt((double)dist2()); }
  double angle() const { return atan2(y, x); }
  TPoint unit() const { return *this / dist(); }
  TPoint perp() const { return TPoint(-y, x); }
  TPoint normal() const { return perp().unit(); }
  TPoint rotate(double a) const {
    return TPoint(x * cos(a) - y * sin(a), x * sin(a) + y * cos(a));
  }
};
using Point = TPoint<double>;
template <class T>
struct TCircle {
  static constexpr T eps = static_cast<T>(1e-8);
  static constexpr T PI = 3.14159265358979323846;
  TPoint<T> c;
  T r;
  TCircle(T x, T y, T rad) : c(x, y), r(rad) {}
  TCircle(TPoint<T> c, T rad) : c(c), r(rad) {}
  T area() const { return PI * r * r; }
  T perimeter() const { return 2 * PI * r; }
  T diameter() const { return 2 * r; }
  bool intersect(TCircle& other, pair<TPoint<T>, TPoint<T> >& out) {
    if (c == other.c) {
      assert(abs(r - other.r) > eps);
      return false;
    }
    TPoint<T> vec = other.c - c;
    T d2 = vec.dist2(), sum = r + other.r, dif = r - other.r,
      p = (d2 + r * r - other.r * other.r) / (d2 * 2), h2 = r * r - p * p * d2;
    if (sum * sum < d2 || dif * dif > d2) return false;
    TPoint<T> mid = c + vec * p, per = vec.perp() * sqrt(fmax(0, h2) / d2);
    out = {mid + per, mid - per};
    return true;
  }
  pair<TPoint<T>, TPoint<T> > circleTangents(const TPoint<T>& p) {
    TPoint<T> a = p - c;
    T x = r * r / a.dist2(), y = sqrt(x - x * x);
    return make_pair(c + a * x + a.perp() * y, c + a * x - a.perp() * y);
  }
};
using Circle = TCircle<double>;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<Circle> crcs(n, Circle(0, 0, 0));
  for (int i = 0; i < n; i++) cin >> crcs[i].c.x >> crcs[i].c.y >> crcs[i].r;
  vector<Point> all;
  DSU d(n);
  int e = 0;
  for (int i = 0; i < n; i++) {
    vector<Point> pat;
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      pair<Point, Point> p;
      if (crcs[i].intersect(crcs[j], p)) {
        d.merge(i, j);
        all.push_back(p.first);
        pat.push_back(p.first);
        all.push_back(p.second);
        pat.push_back(p.second);
      }
    }
    sort(pat.begin(), pat.end());
    e += unique(pat.begin(), pat.end()) - pat.begin();
  }
  sort(all.begin(), all.end());
  int v = unique(all.begin(), all.end()) - all.begin(), c = 0;
  for (int i = 0; i < n; i++) c += (d.find(i) == i);
  cout << e - v + c + 1 << '\n';
}
