#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("avx")
#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long read() {
  long long x = 0;
  bool q = 0;
  char c = getchar();
  while (!isdigit(c)) q |= (c == '-'), c = getchar();
  while (isdigit(c)) x = (x << 1) + (x << 3) + c - '0', c = getchar();
  return q ? -x : x;
}
void print(long long x, char q = '\n') {
  if (x < 0) putchar('-'), x = -x;
  if (x == 0) putchar('0');
  stack<char> s;
  s.push(q);
  while (x > 0) s.push(x % 10 + '0'), x /= 10;
  while (!s.empty()) putchar(s.top()), s.pop();
}
string read_s() {
  string s;
  char c = getchar();
  while (c == ' ' || c == '\t' || c == '\n') c = getchar();
  while (c != ' ' && c != '\t' && c != '\n') s += c, c = getchar();
  return s;
}
void print_s(string s, char q = '\n') {
  for (char c : s) putchar(c);
  putchar(q);
}
char read_c() {
  char c = getchar();
  while (c == ' ' || c == '\t' || c == '\n') c = getchar();
  return c;
}
const long double eps = 1e-12;
struct Point {
  long double x, y;
  Point() {}
  Point(long double x, long double y) : x(x), y(y) {}
  Point operator+(const Point &t) const { return Point(x + t.x, y + t.y); }
  Point operator-(const Point &t) const { return Point(x - t.x, y - t.y); }
  Point operator*(const long double &t) const { return Point(x * t, y * t); }
  Point operator/(const long double &t) const { return Point(x / t, y / t); }
  bool operator<(const Point &t) const {
    return fabs(x - t.x) < eps ? y < t.y : x < t.x;
  }
  bool operator==(const Point &t) const {
    return fabs(x - t.x) < eps && fabs(y - t.y) < eps;
  }
  long double dist() const { return sqrt(x * x + y * y); }
  Point rot90() const { return Point(-y, x); }
};
struct Circle {
  Point o;
  long double r;
  Circle() {}
  Circle(Point o, long double r) : o(o), r(r) {}
  vector<Point> operator^(const Circle &C) {
    long double d = (o - C.o).dist();
    if (d > r + C.r + eps || d < fabs(r - C.r) - eps) return vector<Point>();
    long double dt = (r * r - C.r * C.r) / d, d1 = (d + dt) / 2.0;
    Point dir = (C.o - o) / d, pcrs = o + dir * d1;
    dt = sqrt(max(0.0L, r * r - d1 * d1)), dir = dir.rot90();
    if (dt < eps) return vector<Point>{pcrs};
    return vector<Point>{pcrs + dir * dt, pcrs - dir * dt};
  }
} C[3];
vector<Point> a[3], v;
int p[3];
int root(int x) { return p[x] == x ? x : p[x] = root(p[x]); }
void link(int x, int y) {
  x = root(x);
  y = root(y);
  if (x != y) p[y] = x;
}
int main() {
  int n = read();
  for (int i = 0; i < n; i++) p[i] = i;
  for (int i = 0; i < n; i++)
    C[i].o.x = read(), C[i].o.y = read(), C[i].r = read();
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      vector<Point> aux = C[i] ^ C[j];
      if (!aux.empty()) link(i, j);
      for (auto u : aux) a[i].push_back(u), a[j].push_back(u), v.push_back(u);
    }
  for (int i = 0; i < n; i++)
    sort(a[i].begin(), a[i].end()),
        a[i].resize(unique(a[i].begin(), a[i].end()) - a[i].begin());
  sort(v.begin(), v.end()), v.resize(unique(v.begin(), v.end()) - v.begin());
  int ans = 1;
  for (int i = 0; i < n; i++) ans += a[i].size() + (root(i) == i ? 1 : 0);
  ans -= v.size();
  print(ans);
}
