#include <bits/stdc++.h>
using namespace std;
double x[3], y[3], r[3];
vector<pair<double, double>> v, o[3];
void add_point(vector<pair<double, double>>& v, double x, double y) {
  for (int i = 0; i < v.size(); i++)
    if (fabs(v[i].first - x) < 1e-7 && fabs(v[i].second - y) < 1e-7) return;
  v.push_back(make_pair(x, y));
}
int main() {
  int n, s = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i] >> r[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j) {
        double ox = x[j] - x[i], oy = y[j] - y[i];
        double a = -2 * ox, b = -2 * oy,
               c = ox * ox + oy * oy + r[i] * r[i] - r[j] * r[j];
        double x0 = -a * c / (a * a + b * b), y0 = -b * c / (a * a + b * b),
               d = r[i] * r[i] - c * c / (a * a + b * b),
               mult = sqrt(d / (a * a + b * b));
        if (a * a + b * b == 0 || r[i] * r[i] - c * c / (a * a + b * b) < 0)
          continue;
        add_point(v, x0 + b * mult + x[i], y0 - a * mult + y[i]);
        add_point(v, x0 - b * mult + x[i], y0 + a * mult + y[i]);
        add_point(o[j], x0 + b * mult + x[i], y0 - a * mult + y[i]);
        add_point(o[j], x0 - b * mult + x[i], y0 + a * mult + y[i]);
        add_point(o[i], x0 + b * mult + x[i], y0 - a * mult + y[i]);
        add_point(o[i], x0 - b * mult + x[i], y0 + a * mult + y[i]);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (o[i].size() == 0)
      s++;
    else
      s += o[i].size();
  }
  cout << s + 2 - (v.size() ? v.size() : 1) << endl;
  return 0;
}
