#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) : x(_x), y(_y) {}
  bool operator<(const Point &other) const {
    if (fabs(x - other.x) < EPS) return y + EPS < other.y;
    return x + EPS < other.x;
  }
};
struct Circle {
  int x, y, r;
  Circle() {}
  Circle(int _x, int _y, int _r) : x(_x), y(_y), r(_r) {}
  bool operator!=(const Circle &other) const {
    return x != other.x || y != other.y || r != other.r;
  }
  bool operator<(const Circle &other) const {
    if (x != other.x) return x < other.x;
    if (y != other.y) return y < other.y;
    return r < other.r;
  }
};
set<Circle> circles;
set<Point> intersect(double r, double a, double b, double c) {
  double x0 = -a * c / (a * a + b * b), y0 = -b * c / (a * a + b * b);
  if (c * c > r * r * (a * a + b * b) + EPS) return {};
  if (fabs(c * c - r * r * (a * a + b * b)) < EPS) return {{x0, y0}};
  double d = r * r - c * c / (a * a + b * b);
  double k = sqrt(d / (a * a + b * b));
  double ax = x0 + b * k, bx = x0 - b * k;
  double ay = y0 - a * k, by = y0 + a * k;
  return {{ax, ay}, {bx, by}};
}
set<Point> intersect(Circle c0, Circle c1) {
  int x1 = c0.x, y1 = c0.y, r1 = c0.r;
  int x2 = c1.x, y2 = c1.y, r2 = c1.r;
  x2 -= x1, y2 -= y1;
  int a = -2 * x2;
  int b = -2 * y2;
  int c = x2 * x2 + y2 * y2 + r1 * r1 - r2 * r2;
  auto tmp = intersect(r1, a, b, c);
  set<Point> ret;
  for (auto p : tmp) ret.insert(Point(p.x + x1, p.y + y1));
  return ret;
}
int main() {
  static int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int x, y, r;
    scanf("%d%d%d", &x, &y, &r);
    circles.insert(Circle(x, y, r));
  }
  if (circles.size() == 1) return puts("2"), 0;
  if (circles.size() == 2) {
    vector<Circle> tmp;
    for (auto p : circles) tmp.push_back(p);
    auto judge = intersect(tmp[0], tmp[1]);
    puts(judge.size() == 2 ? "4" : "3");
  } else {
    int E = 0, V = 0, ans = 0;
    set<Point> ret;
    for (auto a : circles) {
      set<Point> cur;
      for (auto b : circles)
        if (a != b) {
          auto tmp = intersect(a, b);
          for (auto point : tmp) {
            cur.insert(point);
            ret.insert(point);
          }
        }
      if (cur.size() == 0)
        ++ans;
      else
        E += cur.size();
    }
    V += ret.size();
    if (E > 0 && V > 0)
      ans += 2 + E - V;
    else
      ++ans;
    printf("%d\n", ans);
  }
}
