#include <bits/stdc++.h>
using ValueType = long double;
const ValueType eps = 1e-12;
inline int dcmp(ValueType x) { return x < -eps ? -1 : x > eps; }
template <typename T>
inline T sqr(T x) {
  return x * x;
}
struct Point;
using Vector = Point;
using Polygon = std::vector<Point>;
struct Point {
  ValueType x, y;
  Point() {}
  Point(ValueType _x, ValueType _y) : x(_x), y(_y) {}
  Point operator+(const Point &rhs) const {
    return Point(x + rhs.x, y + rhs.y);
  }
  Point operator-(const Point &rhs) const {
    return Point(x - rhs.x, y - rhs.y);
  }
  Point operator*(ValueType t) const { return Point(x * t, y * t); }
  bool operator==(const Point &rhs) const {
    return dcmp(x - rhs.x) == 0 && dcmp(y - rhs.y) == 0;
  }
  ValueType length() const { return sqrt(sqr(x) + sqr(y)); }
  bool operator<(const Point &rhs) const {
    int a1 = dcmp(x - rhs.x);
    if (a1 != 0) return a1 < 0;
    return dcmp(y - rhs.y) < 0;
  }
  Point rotate(const Point &o, ValueType angle) const {
    Point t = (*this) - o;
    ValueType c = cos(angle), s = sin(angle);
    return Point(o.x + t.x * c - t.y * s, o.y + t.x * s + t.y * c);
  }
  Point rotate90() const { return Point(-y, x); }
  Vector normal() const {
    ValueType L = length();
    return Vector(-y / L, x / L);
  }
};
ValueType det(const Point &a, const Point &b) { return a.x * b.y - a.y * b.x; }
ValueType dot(const Point &a, const Point &b) { return a.x * b.x + a.y * b.y; }
struct Circle {
  Point o;
  ValueType r;
  Circle() {}
  Circle(const Point &o, ValueType r) : o(o), r(r) {}
};
int x[3], y[3], r[3];
int count(std::vector<Point> const &vec) {
  int ret = 0;
  for (int i = 0; i < vec.size(); ++i) {
    int j = 0;
    while (std::abs(vec[i].x - vec[j].x) > eps ||
           std::abs(vec[i].y - vec[j].y) > eps)
      ++j;
    ret += i == j;
  }
  return ret;
}
std::vector<Point> intersection_circle_circle(const Circle &a, const Circle &b,
                                              int d2, int ra, int rb) {
  ValueType d = (a.o - b.o).length();
  if (d2 > sqr(ra + rb) || d2 < sqr(ra - rb)) return std::vector<Point>();
  ValueType dt = (sqr(a.r) - sqr(b.r)) / d;
  ValueType d1 = (d + dt) * .5;
  Point dir = (b.o - a.o) * (1. / d);
  Point pcrs = a.o + dir * d1;
  dt = sqrt(std::max((ValueType)0, sqr(a.r) - sqr(d1)));
  dir = dir.rotate90();
  return std::vector<Point>{pcrs + dir * dt, pcrs - dir * dt};
}
Circle crs[3];
int n;
int dsu[3];
std::vector<Point> intersection_circle_circle(int i, int j) {
  return intersection_circle_circle(
      crs[i], crs[j], sqr(x[i] - x[j]) + sqr(y[i] - y[j]), r[i], r[j]);
}
int find(int x) { return dsu[x] == x ? x : dsu[x] = find(dsu[x]); }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d%d%d", x + i, y + i, r + i);
    crs[i] = Circle(Point(x[i], y[i]), r[i]);
  }
  for (int i = 0; i < n; ++i) dsu[i] = i;
  std::vector<Point> ps;
  int e = 0;
  for (int i = 0; i < n; ++i) {
    std::vector<Point> qs;
    for (int j = 0; j < n; ++j)
      if (i != j) {
        auto ins = intersection_circle_circle(i, j);
        if (!ins.empty()) {
          int a = find(i);
          int b = find(j);
          if (a != b) dsu[a] = b;
        }
        ps.insert(ps.end(), ins.begin(), ins.end());
        qs.insert(qs.end(), ins.begin(), ins.end());
      }
    std::sort(qs.begin(), qs.end());
    qs.erase(std::unique(qs.begin(), qs.end()), qs.end());
    e += qs.size();
  }
  std::sort(ps.begin(), ps.end());
  ps.erase(std::unique(ps.begin(), ps.end()), ps.end());
  int v = ps.size();
  int c = 0;
  for (int i = 0; i < n; ++i) c += dsu[i] == i;
  printf("%d\n", e - v + c + 1);
}
