#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long a = 0, b = 1;
  int c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-') {
    b = -b;
    c = getchar();
  }
  while (isdigit(c)) {
    a = a * 10 + c - '0';
    c = getchar();
  }
  return a * b;
}
const int maxn = 10;
const long double eps = 1e-12;
struct Point {
  long double x, y;
  Point() { x = y = 0; }
  Point(long double _x, long double _y) : x(_x), y(_y) {}
  Point operator+(const Point &t) const { return Point(x + t.x, y + t.y); }
  Point operator-(const Point &t) const { return Point(x - t.x, y - t.y); }
  Point operator*(const long double &t) const { return Point(x * t, y * t); }
  Point operator/(const long double &t) const { return Point(x / t, y / t); }
  bool operator<(const Point &t) const {
    return fabs(x - t.x) < eps ? y < t.y : x < t.x;
  }
  bool operator==(const Point &t) const {
    return fabs(x - t.x) < eps && fabs(y - t.y) < eps;
  }
  long double len() const { return sqrt(x * x + y * y); }
  Point rot90() const { return Point(-y, x); }
};
struct Circle {
  Point o;
  long double r;
  Circle() {
    Point();
    r = 0;
  }
  Circle(Point _o, long double _r) : o(_o), r(_r) {}
  friend vector<Point> operator&(const Circle &c1, const Circle &c2) {
    long double d = (c1.o - c2.o).len();
    if (d > c1.r + c2.r + eps || d < fabs(c1.r - c2.r) - eps)
      return vector<Point>();
    long double dt = (c1.r * c1.r - c2.r * c2.r) / d, d1 = (d + dt) / 2;
    Point dir = (c2.o - c1.o) / d, pcrs = c1.o + dir * d1;
    dt = sqrt(max(0.0L, c1.r * c1.r - d1 * d1)), dir = dir.rot90();
    vector<Point> ans;
    ans.clear();
    ans.push_back(pcrs + dir * dt);
    ans.push_back(pcrs - dir * dt);
    return ans;
  }
} p[maxn];
bool vis[maxn];
int f[maxn], rk[maxn];
void init() {
  for (int i = 1; i < maxn; i++) {
    f[i] = i;
    rk[i] = 0;
  }
}
int getf(int x) { return f[x] == x ? x : f[x] = getf(f[x]); }
void add(int x, int y) {
  x = getf(x);
  y = getf(y);
  if (rk[x] > rk[y]) {
    f[y] = x;
  } else {
    f[x] = y;
    if (rk[x] == rk[y]) rk[y]++;
  }
}
int n, e = 0, v = 0;
vector<Point> all;
int main() {
  init();
  n = read();
  for (int i = 1; i <= n; i++) {
    p[i].o.x = read();
    p[i].o.y = read();
    p[i].r = read();
  }
  for (int i = 1; i <= n; i++) {
    vector<Point> tmp1;
    for (int j = 1; j <= n; j++)
      if (i != j) {
        vector<Point> tmp2 = p[i] & p[j];
        if (tmp2.size()) add(i, j);
        tmp1.insert(tmp1.end(), tmp2.begin(), tmp2.end());
        all.insert(all.end(), tmp2.begin(), tmp2.end());
      }
    sort(tmp1.begin(), tmp1.end());
    e += unique(tmp1.begin(), tmp1.end()) - tmp1.begin();
  }
  sort(all.begin(), all.end());
  v = unique(all.begin(), all.end()) - all.begin();
  set<int> c;
  for (int i = 1; i <= n; i++) {
    c.insert(getf(i));
  }
  printf("%d\n", (int)(e - v + c.size() + 1));
  return 0;
}
