#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
struct pt {
  double x, y;
} p[2101001], q[2101001];
struct cir {
  int x, y, r;
} a[611];
int V, E, ans, c[611], i, j, k, n, tot, tv;
int cp(double a, double b) {
  if (fabs(a - b) <= eps) return 0;
  return (a < b) ? -1 : 1;
}
int sqr(int x) { return x * x; }
int dist(cir a, cir b) { return sqr(a.x - b.x) + sqr(a.y - b.y); }
int ix(cir a, cir b) {
  int res;
  double k2, l, x0, y0, w, t;
  if (dist(a, b) > sqr(a.r + b.r) || dist(a, b) < sqr(a.r - b.r)) return 0;
  l = sqrt(dist(a, b));
  w = (sqr(a.r) - sqr(b.r) + l * l) / (2 * l * l);
  x0 = a.x + (b.x - a.x) * w;
  y0 = a.y + (b.y - a.y) * w;
  if (dist(a, b) == sqr(a.r + b.r) || dist(a, b) == sqr(a.r - b.r)) {
    p[++tot].x = x0;
    p[tot].y = y0;
    q[++tv] = p[tot];
    return 1;
  }
  t = sqr(a.r) - (x0 - a.x) * (x0 - a.x) - (y0 - a.y) * (y0 - a.y);
  if (a.x == b.x) {
    p[++tot].x = x0 - sqrt(t);
    p[tot].y = y0;
    q[++tv] = p[tot];
    p[++tot].x = x0 + sqrt(t);
    p[tot].y = y0;
    q[++tv] = p[tot];
  } else if (a.y == b.y) {
    p[++tot].x = x0;
    p[tot].y = y0 - sqrt(t);
    q[++tv] = p[tot];
    p[++tot].x = x0;
    p[tot].y = y0 + sqrt(t);
    q[++tv] = p[tot];
  } else {
    k2 = -(double)(a.x - b.x) / (a.y - b.y);
    p[++tot].x = x0 - sqrt(t / (1 + k2 * k2));
    p[tot].y = y0 + k2 * (p[tot].x - x0);
    q[++tv] = p[tot];
    p[++tot].x = x0 + sqrt(t / (1 + k2 * k2));
    p[tot].y = y0 + k2 * (p[tot].x - x0);
    q[++tv] = p[tot];
  }
  return 2;
}
bool cmp(pt a, pt b) {
  int k = cp(a.x, b.x);
  if (k) return k == -1;
  return a.y < b.y;
}
int main() {
  scanf("%d", &n);
  tot = ans = E = 0;
  memset(c, 0, sizeof(c));
  for (i = 1; i <= n; i++) scanf("%d%d%d", &a[i].x, &a[i].y, &a[i].r);
  for (i = 1; i <= n; i++) {
    for (j = 1, tv = 0; j <= n; j++) {
      if (i == j) continue;
      k = ix(a[i], a[j]);
    }
    if (tv > 1) sort(q + 1, q + 1 + tv, cmp);
    for (c[i] = 0, j = 1; j <= tv; j++)
      if (j == 1 || cp(q[j].x, q[j - 1].x) || cp(q[j].y, q[j - 1].y)) c[i]++;
    if (!c[i])
      ans++;
    else
      E += c[i];
  }
  sort(p + 1, p + 1 + tot, cmp);
  for (V = 0, i = 1; i <= tot; i++)
    if (i == 1 || cp(p[i].x, p[i - 1].x) || cp(p[i].y, p[i - 1].y)) V++;
  if (V)
    ans += E - V + 2;
  else
    ans++;
  printf("%d\n", ans);
  return 0;
}
