#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long double eps = 1e-10;
bool equal(long double x, long double y) { return x - eps < y and y < x + eps; }
pair<long double, long double> operator+(
    const pair<long double, long double>& p1,
    const pair<long double, long double>& p2) {
  return {p1.first + p2.first, p1.second + p2.second};
}
pair<long double, long double> operator-(
    const pair<long double, long double>& p1,
    const pair<long double, long double>& p2) {
  return {p1.first - p2.first, p1.second - p2.second};
}
pair<long double, long double> operator*(
    const pair<long double, long double>& tp, const long double& tk) {
  return {tp.first * tk, tp.second * tk};
}
pair<long double, long double> operator/(
    const pair<long double, long double>& tp, const long double& tk) {
  return {tp.first / tk, tp.second / tk};
}
long double operator*(const pair<long double, long double>& p1,
                      const pair<long double, long double>& p2) {
  return p1.first * p2.first + p1.second * p2.second;
}
long double operator^(const pair<long double, long double>& p1,
                      const pair<long double, long double>& p2) {
  return p1.first * p2.second - p1.second * p2.first;
}
bool equal(const pair<long double, long double>& p1,
           const pair<long double, long double>& p2) {
  return equal(p1.first, p2.first) and equal(p1.second, p2.second);
}
long double norm2(const pair<long double, long double>& tp) { return tp * tp; }
long double norm(const pair<long double, long double>& tp) {
  return sqrt(norm2(tp));
}
pair<long double, long double> perp(const pair<long double, long double>& tp) {
  return {tp.second, -tp.first};
}
void scan(pair<long double, long double>& tp) { cin >> tp.first >> tp.second; }
vector<pair<long double, long double> > interCircle(
    pair<long double, long double> o1, long double r1,
    pair<long double, long double> o2, long double r2) {
  if (norm(o1 - o2) > r1 + r2) return {};
  if (norm(o1 - o2) < max(r1, r2) - min(r1, r2)) return {};
  long double d2 = (o1 - o2) * (o1 - o2);
  long double d = sqrt(d2);
  if (d > r1 + r2) return {};
  pair<long double, long double> u =
      (o1 + o2) * 0.5 + (o1 - o2) * ((r2 * r2 - r1 * r1) / (2 * d2));
  long double A =
      sqrt((r1 + r2 + d) * (r1 - r2 + d) * (r1 + r2 - d) * (-r1 + r2 + d));
  pair<long double, long double> v =
      pair<long double, long double>(o1.second - o2.second,
                                     -o1.first + o2.first) *
      A / (2 * d2);
  return {u + v, u - v};
}
int n, p[55];
int f(int x) { return x == p[x] ? x : p[x] = f(p[x]); }
void uni(int x, int y) { p[f(x)] = f(y); }
pair<pair<long double, long double>, long double> c[55];
void uniq(vector<pair<long double, long double> >& vv) {
  sort(vv.begin(), vv.end());
  if (vv.empty()) return;
  size_t nsz = 1;
  for (size_t i = 1; i < vv.size(); i++) {
    bool ok = true;
    for (size_t j = 0; j < nsz and ok; j++)
      if (equal(vv[i], vv[j])) ok = false;
    if (ok) vv[nsz++] = vv[i];
  }
  vv.resize(nsz);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    p[i] = i;
    scan(c[i].first);
    cin >> c[i].second;
  }
  vector<pair<long double, long double> > v;
  int e = 0;
  for (int i = 0; i < n; i++) {
    vector<pair<long double, long double> > vv;
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      vector<pair<long double, long double> > ret =
          interCircle(c[i].first, c[i].second, c[j].first, c[j].second);
      if (ret.empty()) continue;
      uni(i, j);
      for (auto ip : ret) {
        v.push_back(ip);
        vv.push_back(ip);
      }
    }
    uniq(vv);
    e += vv.size();
  }
  uniq(v);
  int ans = 1 - v.size() + e;
  for (int i = 0; i < n; i++)
    if (f(i) == i) ans++;
  printf("%d\n", ans);
}
