#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 + 10;
struct yuan {
  double x;
  double y;
  double r;
} circle[maxn];
pair<double, double> s[110][maxn];
int cnt[maxn];
int vis[maxn];
int sett[maxn];
double cald(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int check(double x, double y, int pos) {
  for (int i = 0; i < cnt[pos]; i++) {
    if (fabs(x - s[pos][i].first) < 0.00000001 &&
        fabs(y - s[pos][i].second) < 0.00000001)
      return 0;
  }
  return 1;
}
void Add(double x, double y, int a, int b) {
  if (check(x, y, 0)) {
    s[0][cnt[0]].first = x;
    s[0][cnt[0]++].second = y;
  }
  if (check(x, y, a)) {
    s[a][cnt[a]].first = x;
    s[a][cnt[a]++].second = y;
  }
  if (check(x, y, b)) {
    s[b][cnt[b]].first = x;
    s[b][cnt[b]++].second = y;
  }
}
int find_papa(int x) { return sett[x] == x ? x : sett[x] = find_papa(sett[x]); }
void Connection(int a, int b) {
  int x = find_papa(a);
  int y = find_papa(b);
  if (x != y) {
    sett[x] = y;
  }
}
void calnode(int a, int b) {
  double d = cald(circle[a].x, circle[a].y, circle[b].x, circle[b].y);
  if (d > (circle[a].r + circle[b].r) || fabs(d) < 0.00000001) return;
  if (d + min(circle[a].r, circle[b].r) < max(circle[a].r, circle[b].r)) return;
  double o = circle[a].r * circle[a].r - circle[b].r * circle[b].r +
             (circle[b].y * circle[b].y - circle[a].y * circle[a].y) +
             (circle[b].x * circle[b].x - circle[a].x * circle[a].x);
  o /= 2;
  if (fabs(circle[b].y - circle[a].y) < 0.00000001) {
    double x1 = o / (circle[b].x - circle[a].x);
    double k = sqrt(
        (circle[a].r * circle[a].r - (x1 - circle[a].x) * (x1 - circle[a].x)));
    if (fabs(k) < 0.00000001) {
      double y1 = circle[a].y;
      Add(x1, y1, a, b);
      Connection(a, b);
    } else {
      double y1 = k + circle[a].y;
      Add(x1, y1, a, b);
      y1 = circle[a].y - k;
      Add(x1, y1, a, b);
      Connection(a, b);
    }
  } else {
    double A = (circle[a].x - circle[b].x) / (circle[b].y - circle[a].y);
    double B = o / (circle[b].y - circle[a].y);
    double k = circle[a].r * circle[a].r - circle[a].x * circle[a].x -
               circle[a].y * circle[a].y;
    double q1 = 1 + A * A;
    double q2 = 2 * A * B - 2 * circle[a].x - 2 * circle[a].y * A;
    double q3 = B * B - 2 * circle[a].y * B - k;
    double h = (q2 * q2 - 4 * q1 * q3);
    if (fabs(h) < 0.00000001) {
      double x1 = (-q2) / (2 * q1);
      double y1 = A * x1 + B;
      Add(x1, y1, a, b);
      Connection(a, b);
    } else {
      h = sqrt(h);
      double x1 = (-q2 + h) / (2 * q1);
      double y1 = A * x1 + B;
      Add(x1, y1, a, b);
      x1 = (-q2 - h) / (2 * q1);
      y1 = A * x1 + B;
      Add(x1, y1, a, b);
      Connection(a, b);
    }
  }
}
void init() {
  memset(vis, 0, sizeof(vis));
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < maxn; ++i) {
    sett[i] = i;
  }
}
int main() {
  int n;
  scanf("%d", &n);
  init();
  for (int i = 1; i <= n; i++) {
    scanf("%lf%lf%lf", &circle[i].x, &circle[i].y, &circle[i].r);
    for (int j = i - 1; j >= 1; j--) {
      calnode(i, j);
    }
  }
  int e = 0, v = cnt[0], c = 0;
  for (int i = 1; i <= n; i++) {
    int fa = find_papa(i);
    if (vis[fa] == 0) {
      vis[fa] = 1;
      c++;
    }
    e += cnt[i];
  }
  int num = e - v + c + 1;
  printf("%d\n", num);
  return 0;
}
