#include <bits/stdc++.h>
using namespace std;
mt19937 rng((int)chrono::steady_clock::now().time_since_epoch().count());
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const long double DINF = 1e18;
const long double pi = acos(-1.0);
const long double eps = 1e-6;
bool eq(long double a, long double b) { return abs(a - b) <= eps; }
struct pt {
  long double x, y;
  pt() {}
  pt(long double x_, long double y_) : x(x_), y(y_) {}
  bool operator<(const pt p) const {
    if (!eq(x, p.x)) return x < p.x;
    if (!eq(y, p.y)) return y < p.y;
    return 0;
  }
  bool operator==(const pt p) const { return eq(x, p.x) and eq(y, p.y); }
  pt operator+(const pt p) const { return pt(x + p.x, y + p.y); }
  pt operator-(const pt p) const { return pt(x - p.x, y - p.y); }
  pt operator*(const long double c) const { return pt(x * c, y * c); }
  pt operator/(const long double c) const { return pt(x / c, y / c); }
  long double operator*(const pt p) const { return x * p.x + y * p.y; }
  long double operator^(const pt p) const { return x * p.y - y * p.x; }
  friend istream& operator>>(istream& in, pt& p) { return in >> p.x >> p.y; }
};
long double dist(pt p, pt q) { return hypot(p.y - q.y, p.x - q.x); }
pt rotate90(pt p) { return pt(-p.y, p.x); }
vector<pt> circ_inter(pt a, pt b, long double r, long double R) {
  vector<pt> ret;
  long double d = dist(a, b);
  if (d > r + R or d + min(r, R) < max(r, R)) return ret;
  long double x = (d * d - R * R + r * r) / (2 * d);
  long double y = sqrt(r * r - x * x);
  pt v = (b - a) / d;
  ret.push_back(a + v * x + rotate90(v) * y);
  if (y > 0) ret.push_back(a + v * x - rotate90(v) * y);
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> x(n), y(n), r(n);
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i] >> r[i];
  auto intersect = [&](int i, int j) {
    return circ_inter(pt(x[i], y[i]), pt(x[j], y[j]), r[i], r[j]).size();
  };
  vector<int> p(n);
  for (int i = 0; i < n; i++) p[i] = i;
  auto find = [&](int a) {
    while (p[a] != a) a = p[a];
    return a;
  };
  auto merge = [&](int a, int b) {
    a = find(a);
    b = find(b);
    p[a] = b;
  };
  for (int i = 0; i < n; i++)
    for (int j = i; j < n; j++)
      if (intersect(i, j)) merge(i, j);
  auto insert = [&](vector<pt>& sv, pt a) {
    bool inside = false;
    for (auto b : sv)
      if (dist(a, b) < eps) inside = true;
    if (!inside) sv.push_back(a);
  };
  int v = 0;
  int e = 0;
  int f = 1;
  vector<pt> sv;
  for (int i = 0; i < n; i++) {
    vector<pt> curr;
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      for (auto it : circ_inter(pt(x[i], y[i]), pt(x[j], y[j]), r[i], r[j])) {
        insert(sv, it);
        insert(curr, it);
      }
    }
    if (!curr.empty()) {
      e += curr.size() + 1;
      v++;
    }
  }
  v += sv.size();
  set<int> cc;
  for (int i = 0; i < n; i++) {
    cc.insert(find(i));
  }
  f += e - v + cc.size();
  cout << f << '\n';
  exit(0);
}
