#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using pnt = pair<double, double>;
const double EPS = 1e-12;
vector<pnt> intersect(int x1, int y1, int r1, int x2, int y2, int r2) {
  if (x1 == x2 && y1 == y2) return {};
  r1 *= r1;
  r2 *= r2;
  int R2 = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
  int R4 = R2 * R2;
  int d1 = 2 * (r1 + r2);
  int d2 = (r1 - r2) * (r1 - r2) + R4;
  if (d1 * R4 < d2 * R2) return {};
  double first = (x1 + x2) / 2.0 + (x2 - x1) * (r1 - r2) / (2.0 * R2);
  double second = (y1 + y2) / 2.0 + (y2 - y1) * (r1 - r2) / (2.0 * R2);
  if (d1 * R4 == d2 * R2) return {pnt(first, second)};
  double d = sqrt(1.0 * d1 / R2 - 1.0 * d2 / R4) / 2.0;
  return {
      pnt(first + d * (y2 - y1), second + d * (x1 - x2)),
      pnt(first - d * (y2 - y1), second - d * (x1 - x2)),
  };
}
bool oncircle(int first, int second, int r, pnt p) {
  return abs((first - p.first) * (first - p.first) +
             (second - p.second) * (second - p.second) - r * r) < EPS;
}
int n;
int first[3];
int second[3];
int r[3];
vector<pnt> ps;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(10);
  cin >> n;
  for (int i = 0; i < (n); ++i) cin >> first[i] >> second[i] >> r[i];
  for (int i = 0; i < (n); ++i) {
    for (int j = i + 1; j < (n); ++j) {
      for (pnt p :
           intersect(first[i], second[i], r[i], first[j], second[j], r[j])) {
        bool add = true;
        for (pnt q : ps) {
          if (abs(p.first - q.first) < EPS && abs(p.second - q.second) < EPS) {
            add = false;
          }
        }
        if (add) {
          ps.push_back(p);
        }
      }
    }
  }
  if (ps.empty()) {
    cout << n + 1 << endl;
    return 0;
  }
  int e = 0;
  for (int i = 0; i < (n); ++i) {
    int k = 0;
    for (pnt p : ps)
      if (oncircle(first[i], second[i], r[i], p)) k += 1;
    e += max(k, 1);
  }
  cout << e - int(ps.size()) + 2 << endl;
  return 0;
}
