#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double INF = 1e30;
struct Point {
  double x, y;
  Point() : x(0), y(0) {}
  Point(double x, double y) : x(x), y(y) {}
  Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); }
  Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); }
  Point operator*(const double& d) const { return Point(x * d, y * d); }
  Point operator/(const double& d) const { return Point(x / d, y / d); }
  double vec(const Point& p) const { return x * p.y - p.x * y; }
  double dot(const Point& p) const { return x * p.x + y * p.y; }
  double dist(Point p) const {
    return sqrt((x - p.x) * (x - p.x) + (y - p.y) * (y - p.y));
  }
  double dist2(Point p) const {
    return (x - p.x) * (x - p.x) + (y - p.y) * (y - p.y);
  }
  int cmp(const Point& p) const {
    if (abs(x - p.x) < eps && abs(y - p.y) < eps) return 0;
    if (x != p.x) return x < p.x ? -1 : 1;
    return y < p.y ? -1 : 1;
  }
};
struct Line {
  double a, b, c;
  Line() : a(0), b(0), c(0) {}
  Line(double a, double b, double c) : a(a), b(b), c(c) { norm(); }
  Line(const Point& t1, const Point& t2) {
    a = t2.y - t1.y;
    b = t1.x - t2.x;
    c = -a * t1.x - b * t1.y;
    norm();
  }
  void norm() {
    if (a < -eps || (abs(a) < eps && b < -eps) ||
        (abs(a) < eps && abs(b) < eps && c < -eps)) {
      a = -a;
      b = -b;
      c = -c;
    }
    if (sqrt(a * a + b * b) < eps) return;
    double t = sqrt(a * a + b * b);
    a /= t;
    b /= t;
    c /= t;
  }
  double eval(Point point) { return a * point.x + b * point.y + c; }
  bool lie(Point point) { return abs(eval(point)) < eps; }
  Line perpendicular(Point point) {
    return Line(-b, a, b * point.x - a * point.y);
  }
  double dist(Point point) { return abs(eval(point)); }
  bool parallel(Line other) { return abs(a * other.b - b * other.a) < eps; }
  Point intersect(Line other) {
    if (parallel(other)) return Point(INF, INF);
    double det = b * other.a - a * other.b;
    double x = (c * other.b - b * other.c) / det;
    double y = (a * other.c - c * other.a) / det;
    return Point(x, y);
  }
};
struct Circle {
  Point p;
  double r;
  Circle() : r(0) {}
  Circle(Point p, double r) : p(p), r(r) {}
  bool on(Point point) { return p.dist(point) < r + eps; }
  bool inside(Point point) { return p.dist(point) + eps < r; }
  vector<Point> intersect(Line line) {
    vector<Point> res;
    double dist = line.dist(p);
    if (dist > r + eps) return res;
    Point intersection = line.intersect(line.perpendicular(p));
    if (abs(dist - r) < eps) {
      res.push_back(intersection);
      return res;
    }
    double shift = sqrt(r * r - dist * dist);
    res.push_back(Point(intersection.x + shift * line.b,
                        intersection.y - shift * line.a));
    res.push_back(Point(intersection.x - shift * line.b,
                        intersection.y + shift * line.a));
    return res;
  }
  vector<Point> intersect(Circle circle) {
    vector<Point> res;
    double dist = p.dist(circle.p);
    if (dist > r + circle.r + eps || abs(r - circle.r) > dist + eps) return res;
    double t = (r + circle.r + dist) / 2.0;
    double h = 2.0 * sqrt(t * (t - r) * (t - circle.r) * (t - dist)) / dist;
    double l1 = sqrt(r * r - h * h);
    double l2 = sqrt(circle.r * circle.r - h * h);
    if (r * r + dist * dist < circle.r * circle.r) l1 = -l1;
    if (r * r > dist * dist + circle.r * circle.r) l2 = -l2;
    Point m((p.x * l2 + circle.p.x * l1) / (l1 + l2),
            (p.y * l2 + circle.p.y * l1) / (l1 + l2));
    Line line(p, circle.p);
    return intersect(line.perpendicular(m));
  }
};
int n;
Circle c[8];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int x, y, r;
    scanf("%d%d%d", &x, &y, &r);
    c[i] = Circle(Point(x, y), r);
  }
  if (n == 1) {
    puts("2");
    return 0;
  }
  vector<Point> ver;
  int comp = 0, ed = 0;
  for (int i = 0; i < n; ++i) {
    vector<Point> t;
    for (int j = 0; j < n; ++j) {
      if (i == j) continue;
      vector<Point> w = c[i].intersect(c[j]);
      if ((int(w.size())) == 2 && w[0].cmp(w[1]) == 0) w.pop_back();
      for (const Point& p : w) {
        bool ok = 1;
        for (const Point& tt : t)
          if (p.cmp(tt) == 0) ok = 0;
        if (ok) t.push_back(p);
      }
    }
    if (!(int(t.size()))) {
      ++comp;
      continue;
    }
    ed += (int(t.size()));
    for (const Point& tt : t) {
      bool ok = 1;
      for (const Point& v : ver)
        if (v.cmp(tt) == 0) ok = 0;
      if (ok) ver.push_back(tt);
    }
  }
  if (n == comp) {
    printf("%d\n", n + 1);
    return 0;
  }
  printf("%d\n", 2 + ed - (int(ver.size())) + comp);
  return 0;
}
