#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
int sgn(double a) { return (a > EPS) - (a < -EPS); }
int sgn(double a, double b) { return sgn(a - b); }
istream& operator>>(istream& i, complex<double>& p) {
  double x, y;
  i >> x >> y;
  p = complex<double>(x, y);
  return i;
}
ostream& operator<<(ostream& o, const complex<double>& p) {
  return o << "(" << p.real() << ", " << p.imag() << ")";
}
bool cmpP(const complex<double>& a, const complex<double>& b) {
  return 2 * sgn(a.real(), b.real()) + sgn(a.imag(), b.imag()) < 0;
}
bool operator==(const complex<double>& a, const complex<double>& b) {
  return !cmpP(a, b) && !cmpP(b, a);
}
bool operator!=(const complex<double>& a, const complex<double>& b) {
  return !(a == b);
}
struct C {
  complex<double> p;
  double r;
  C(complex<double> p_ = complex<double>(), double r_ = double())
      : p(p_), r(r_) {}
  friend istream& operator>>(istream& i, C& c) { return i >> c.p >> c.r; }
};
vector<complex<double> > circle_isect(const C& l, const C& r) {
  double d = abs(l.p - r.p);
  if (abs(d) == 0) return vector<complex<double> >();
  double a = l.r;
  double b = r.r;
  double c = (a * a + d * d - b * b) / (2 * a * d);
  if (sgn(fabs(c) - 1.) == 1) return vector<complex<double> >();
  double s = sqrt(1. - c * c);
  complex<double> tmp = (r.p - l.p) / d * l.r;
  vector<complex<double> > res;
  res.push_back(l.p + tmp * complex<double>(c, s));
  res.push_back(l.p + tmp * complex<double>(c, -s));
  if (res[0] == res[1]) res.pop_back();
  return res;
}
int count_distinct(vector<complex<double> > v) {
  sort(v.begin(), v.end(), cmpP);
  int res = 0;
  for (int i = 0; i < int(v.size()); i++) {
    if (i == 0 || v[i - 1] != v[i]) {
      res++;
    }
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cout << fixed << setprecision(20);
  int N;
  cin >> N;
  vector<C> circs(N);
  for (int i = 0; i < N; i++) {
    cin >> circs[i];
  }
  int V = 0;
  int E = 0;
  vector<complex<double> > allPts;
  for (int i = 0; i < N; i++) {
    vector<complex<double> > curPts;
    for (int j = 0; j < N; j++) {
      if (i == j) continue;
      vector<complex<double> > isect = circle_isect(circs[i], circs[j]);
      allPts.insert(allPts.end(), isect.begin(), isect.end());
      curPts.insert(curPts.end(), isect.begin(), isect.end());
    }
    E += max(1, count_distinct(curPts));
  }
  V += max(1, count_distinct(allPts));
  int F = E - V + 2;
  cout << F << '\n';
  return 0;
}
