#include <bits/stdc++.h>
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-funroll-loops")
#pragma GCC target("avx,sse4")
using namespace std;
const int N = 15;
const double eps = 1e-7;
struct P {
  double x, y;
  P(double _x = 0, double _y = 0) {
    x = _x;
    y = _y;
  }
  friend bool operator<(const P& a, const P& b) {
    if (fabs(a.x - b.x) > eps) return a.x < b.x;
    return a.y < b.y;
  }
  friend bool operator==(const P& a, const P& b) {
    return fabs(a.x - b.x) < eps && fabs(a.y - b.y) < eps;
  }
  friend P operator+(const P& a, const P& b) { return P(a.x + b.x, a.y + b.y); }
  friend P operator-(const P& a, const P& b) { return P(a.x - b.x, a.y - b.y); }
  double ang() { return atan2(y, x); }
  double len() { return sqrt(x * x + y * y); }
} p[N];
vector<P> poi;
vector<P> poc[N];
double r[N];
int n, E, V, fa[N];
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
int main() {
  cin >> n;
  for (register int i = 1, _lim_ = n; i <= _lim_; i++)
    cin >> p[i].x >> p[i].y >> r[i], fa[i] = i;
  for (register int i = 1, _lim_ = n; i <= _lim_; i++)
    for (register int j = 1, _lim_ = n; j <= _lim_; j++)
      if (i != j) {
        double l = (p[j] - p[i]).len();
        if (r[i] + r[j] + eps < l || fabs(r[i] - r[j]) > l + eps) continue;
        double k = (p[j] - p[i]).ang();
        double a = r[j], b = r[i], c = l;
        double cosA = (b * b + c * c - a * a) / (2 * b * c);
        if (cosA < -1) cosA = -1;
        if (cosA > 1) cosA = 1;
        double A = acos(cosA);
        double kk;
        P now;
        kk = k - A;
        now = p[i] + P(r[i] * cos(kk), r[i] * sin(kk));
        poi.push_back(now);
        poc[i].push_back(now);
        kk = k + A;
        now = p[i] + P(r[i] * cos(kk), r[i] * sin(kk));
        poi.push_back(now);
        poc[i].push_back(now);
        fa[find(i)] = find(j);
      }
  sort(poi.begin(), poi.end());
  V = ((int)poi.size());
  for (int i = 0; i + 1 < ((int)poi.size()); i++)
    if (poi[i] == poi[i + 1]) V--;
  for (register int i = 1, _lim_ = n; i <= _lim_; i++) {
    if (fa[i] == i) E++;
    sort(poc[i].begin(), poc[i].end());
    E += ((int)poc[i].size());
    for (int j = 0; j + 1 < ((int)poc[i].size()); j++)
      if (poc[i][j] == poc[i][j + 1]) E--;
  }
  printf("%d\n", E + 1 - V);
  return 0;
}
