#include <bits/stdc++.h>
using namespace std;
int sq(int x) { return x * x; }
int numdedup(const vector<pair<double, double>>& v) {
  int num = v.size();
  for (int i = 0; i < v.size(); ++i) {
    for (int j = i + 1; j < v.size(); ++j) {
      if (fabs(v[j].first - v[i].first) < 1e-7 &&
          fabs(v[j].second - v[i].second) < 1e-7) {
        num--;
        break;
      }
    }
  }
  return num;
}
int main() {
  ios::sync_with_stdio(false);
  cout.precision(12);
  int n = 0;
  cin >> n;
  if (n == 1) {
    cout << 2 << endl;
    return 0;
  }
  int r[3];
  int x[3];
  int y[3];
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i] >> r[i];
  vector<pair<double, double>> ipoints;
  int num_edges = 0;
  int f = 0;
  for (int i = 0; i < n; ++i) {
    vector<pair<double, double>> ip;
    for (int j = 0; j < n; ++j) {
      if (j == i) continue;
      const int dx = x[j] - x[i];
      const int dy = y[j] - y[i];
      const int d2 = dx * dx + dy * dy;
      const double d = sqrt(d2);
      if (d2 > sq(r[i] + r[j]) || d2 < sq(r[i] - r[j])) continue;
      if (d2 == sq(r[i] + r[j]) || d2 == sq(r[i] - r[j])) {
        double coeff = r[i] / d;
        if (sq(r[j]) > d2 && r[j] > r[i]) coeff *= -1;
        ipoints.push_back({x[i] + dx * coeff, y[i] + dy * coeff});
        ip.push_back(ipoints.back());
      } else {
        const double l = (sq(r[i]) - sq(r[j]) + d2) / (2 * d);
        const double h = sqrt(sq(r[i]) - l * l);
        for (double sign : {-1.0, +1.0}) {
          ipoints.push_back({l / d * dx + sign * h / d * dy + x[i],
                             l / d * dy - sign * h / d * dx + y[i]});
          ip.push_back(ipoints.back());
        }
      }
      if (ip.size() > 0) {
        cerr << "Intersections of (x=" << x[i] << ", y=" << y[i]
             << ", R=" << r[i] << ") and (x=" << x[j] << ", y=" << y[j]
             << ", R=" << r[j] << "):" << endl;
        for (const auto& p : ip) {
          cerr << "  X=" << p.first << ", Y=" << p.second << endl;
        }
      }
    }
    const int num_int = numdedup(ip);
    if (num_int == 0) {
      ++f;
    } else {
      num_edges += num_int;
    }
    cerr << "Circle #" << i << ": " << num_int << " intersections." << endl;
  }
  cerr << "Alone: " << f << ", Edges: " << num_edges
       << ", Intersections: " << numdedup(ipoints) << endl;
  cout << (ipoints.empty() ? f + 1 : 2 + num_edges - numdedup(ipoints) + f)
       << endl;
}
