#include <bits/stdc++.h>
using namespace std;
struct data {
  double x, y, r;
} p[5];
vector<pair<double, double> > v[5];
int n, ans, num[5];
int che(pair<double, double> a, int b) {
  for (auto i : v[b]) {
    if (abs(a.first - i.first) < 1e-7 && abs(a.second - i.second) < 1e-7)
      return 1;
  }
  v[b].push_back(a);
  return 0;
}
void deal(int a, int b) {
  double r1 = p[a].r, x1 = p[a].x, y1 = p[a].y, r2 = p[b].r, x2 = p[b].x,
         y2 = p[b].y;
  double m1 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2),
         m2 = (r1 - r2) * (r1 - r2), m3 = (r1 + r2) * (r1 + r2);
  if (m1 < m2 || m1 > m3) return;
  double ang = atan2(y2 - y1, x2 - x1);
  double del = acos((r1 * r1 + m1 - r2 * r2) / (2 * r1 * sqrt(m1)));
  pair<double, double> p1 =
      make_pair(x1 + r1 * cos(ang + del), y1 + r1 * sin(ang + del));
  pair<double, double> p2 =
      make_pair(x1 + r1 * cos(ang - del), y1 + r1 * sin(ang - del));
  if (!che(p1, a)) num[a]++;
  if (!che(p2, a)) num[a]++;
  if (!che(p1, b)) num[b]++;
  if (!che(p2, b)) num[b]++;
  che(p1, 4);
  che(p2, 4);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lf%lf%lf", &p[i].x, &p[i].y, &p[i].r);
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) deal(i, j);
  }
  for (int i = 1; i <= n; i++) {
    ans += num[i];
    if (num[i] == 0) ans++;
  }
  for (int i = 1; i <= n; i++) {
    if (num[i]) {
      ans++;
      break;
    }
  }
  ans = ans + 1 - v[4].size();
  printf("%d\n", ans);
}
