#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
struct point {
  double x, y;
  point() {}
  point(double x, double y) : x(x), y(y) {}
  point operator-(const point &rhs) const {
    return point(x - rhs.x, y - rhs.y);
  }
  point operator/(const double &rhs) const { return point(x / rhs, y / rhs); }
  point operator*(const double &rhs) const { return point(x * rhs, y * rhs); }
  point operator+(const point &rhs) const {
    return point(x + rhs.x, y + rhs.y);
  }
  bool operator<(const point &rhs) const {
    if (abs(x - rhs.x) <= eps) return y < rhs.y;
    return x < rhs.x;
  }
  bool operator==(const point &rhs) const {
    return abs(x - rhs.x) <= eps && abs(y - rhs.y) <= eps;
  }
  double norm() { return hypot(x, y); }
};
struct circle {
  int x, y, r;
};
int n;
circle arr[3];
int par[3];
int find(int x) {
  if (x == par[x]) return x;
  return par[x] = find(par[x]);
}
void merge(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y) return;
  par[x] = y;
}
point RotateCCW90(point p) { return point(-p.y, p.x); }
vector<point> CircleCircleIntersection(point a, point b, double r, double R) {
  vector<point> ret;
  double d = (a - b).norm();
  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);
  point 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;
}
vector<point> intersect(circle &a, circle &b) {
  vector<point> ret;
  int d = (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
  if ((a.r - b.r) * (a.r - b.r) <= d && d <= (a.r + b.r) * (a.r + b.r)) {
    double e = b.x - a.x;
    double f = b.y - a.y;
    double p = sqrt(e * e + f * f);
    double k = (p * p + a.r * a.r - b.r * b.r) / (2 * p);
    double x1 = a.x + (e * k) / p + (f / p) * sqrt(a.r * a.r - k * k);
    double y1 = a.y + (f * k) / p - (e / p) * sqrt(a.r * a.r - k * k);
    double x2 = a.x + (e * k) / p - (f / p) * sqrt(a.r * a.r - k * k);
    double y2 = a.y + (f * k) / p + (e / p) * sqrt(a.r * a.r - k * k);
    ret.push_back(point(x1, y1));
    ret.push_back(point(x2, y2));
  }
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    par[i] = i;
    scanf("%d%d%d", &arr[i].x, &arr[i].y, &arr[i].r);
  }
  vector<point> p;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      vector<point> temp = intersect(arr[i], arr[j]);
      if (temp.size()) merge(i, j);
      for (auto x : temp) p.push_back(x);
    }
  sort(p.begin(), p.end());
  p.erase(unique(p.begin(), p.end()), p.end());
  int c, e, v;
  c = e = v = 0;
  v = p.size();
  int ans = 1;
  for (int i = 0; i < n; i++) {
    if (par[i] == i) c++;
    for (auto t : p) {
      if (abs((t - point(arr[i].x, arr[i].y)).norm() - arr[i].r) <= eps) {
        e++;
      }
    }
  }
  ans = 1 + c + e - v;
  cout << ans << endl;
  return 0;
}
