#include <bits/stdc++.h>
using namespace std;
double INF = 1e100;
double EPS = 1e-9;
struct PT {
  double x, y;
  PT() {}
  PT(double x, double y) : x(x), y(y) {}
  PT(const PT &p) : x(p.x), y(p.y) {}
  PT operator+(const PT &p) const { return PT(x + p.x, y + p.y); }
  PT operator-(const PT &p) const { return PT(x - p.x, y - p.y); }
  PT operator*(double c) const { return PT(x * c, y * c); }
  PT operator/(double c) const { return PT(x / c, y / c); }
};
double dot(PT p, PT q) { return p.x * q.x + p.y * q.y; }
double dist2(PT p, PT q) { return dot(p - q, p - q); }
double cross(PT p, PT q) { return p.x * q.y - p.y * q.x; }
PT RotateCCW90(PT p) { return PT(-p.y, p.x); }
PT RotateCW90(PT p) { return PT(p.y, -p.x); }
PT RotateCCW(PT p, double t) {
  return PT(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));
}
vector<PT> CircleCircleIntersection(PT a, PT b, double r, double R) {
  vector<PT> ret;
  double d = sqrt(dist2(a, b));
  if (d > r + R || d + min(r, R) < max(r, R)) return ret;
  double x = (d * d - R * R + r * r) / (2 * d);
  double y = sqrt(r * r - x * x);
  PT v = (b - a) / d;
  ret.push_back(a + v * x + RotateCCW90(v) * y);
  if (y > 0) ret.push_back(a + v * x - RotateCCW90(v) * y);
  return ret;
}
const int N = 505;
int vis[N];
int edge[N][N];
PT C[N];
double R[N];
int compare(PT a, PT b) {
  return abs(a.x - b.x) < EPS and abs(a.y - b.y) < EPS;
}
bool cmp(PT a, PT b) {
  if (a.x != b.x) return a.x < b.x;
  return a.y < b.y;
}
int uniq(vector<PT> &V) {
  sort(V.begin(), V.end(), cmp);
  if (V.size() == 0) return 0;
  int ans = 1;
  for (int i = 1; i < V.size(); i++) {
    if (compare(V[i], V[i - 1]) == 0) ans++;
  }
  return ans;
}
void dfs(int u) {
  vis[u] = 1;
  for (int i = 1; i <= 500; i++) {
    if (edge[u][i] == 1 and vis[i] == 0) {
      dfs(i);
    }
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> C[i].x >> C[i].y >> R[i];
  }
  int ans = 0;
  vector<PT> all;
  int e = 0, v = 0, c = 0;
  for (int i = 1; i <= n; i++) {
    vector<PT> V;
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      vector<PT> inter = CircleCircleIntersection(C[i], C[j], R[i], R[j]);
      if (inter.size() > 0) edge[i][j] = 1;
      for (int k = 0; k < inter.size(); k++)
        V.push_back(inter[k]), all.push_back(inter[k]);
    }
    e += uniq(V);
  }
  v = uniq(all);
  for (int i = 1; i <= n; i++) {
    if (vis[i] == 0) {
      dfs(i);
      c++;
    }
  }
  printf("%d\n", e - v + c + 1);
}
