#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 5;
const int MOD = 1e9 + 7;
const long double eps = 1e-12;
class point {
 public:
  long double x, y;
  point(long double x = 0, long double y = 0) { this->x = x, this->y = y; }
  long double dist(const point &a) {
    long double d;
    d = (x - a.x) * (x - a.x) + (y - a.y) * (y - a.y);
    d = sqrt(d);
    return d;
  }
  bool operator<(const point &a) const {
    if (((x - a.x) > 0 ? (x - a.x) : (-(x - a.x))) <= eps) return y < a.y;
    return x < a.x;
  }
  bool operator==(const point &a) const {
    return (((x - a.x) > 0 ? (x - a.x) : (-(x - a.x))) <= eps &&
            ((y - a.y) > 0 ? (y - a.y) : (-(y - a.y))) <= eps);
  }
};
class circle {
 public:
  point o;
  long double r;
  circle() { o = point(0, 0), r = 0; }
  void setCircle(point o, long double r) {
    this->o = o;
    this->r = r;
  }
  vector<point> intersection(const circle &cc) {
    long double d = o.dist(cc.o);
    if (d > r + cc.r || (d < ((r - cc.r) > 0 ? (r - cc.r) : (-(r - cc.r)))))
      return vector<point>();
    long double alpha = atan2(cc.o.y - o.y, cc.o.x - o.x);
    long double delta = (r * r + d * d - cc.r * cc.r) / (2 * r * d);
    delta = acos(max((long double)-1.0, (min((long double)1.0, delta))));
    point p1(o.x + r * cos(alpha + delta), o.y + r * sin(alpha + delta));
    point p2(o.x + r * cos(alpha - delta), o.y + r * sin(alpha - delta));
    vector<point> res;
    res.push_back(p1);
    res.push_back(p2);
    return res;
  }
} cyc[60];
int parent[60];
int Find(int u) {
  if (parent[u] == u)
    return u;
  else
    return parent[u] = Find(parent[u]);
}
void unite(int u, int v) {
  int n = Find(u);
  int m = Find(v);
  parent[m] = n;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, x, y, r;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y >> r;
    cyc[i].setCircle(point(x, y), r);
  }
  for (int i = 0; i < n; i++) parent[i] = i;
  int e = 0, v = 0, c = 0;
  vector<point> node;
  for (int i = 0; i < n; i++) {
    vector<point> vec;
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      vector<point> res = cyc[i].intersection(cyc[j]);
      if (!res.empty()) unite(i, j);
      for (auto it : res) {
        vec.push_back(it);
        node.push_back(it);
      }
    }
    sort(vec.begin(), vec.end());
    e += unique(vec.begin(), vec.end()) - vec.begin();
  }
  sort(node.begin(), node.end());
  v = unique(node.begin(), node.end()) - node.begin();
  for (int i = 0; i < n; i++)
    if (i == Find(i)) c++;
  cout << e - v + c + 1 << endl;
  return 0;
}
