#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-12;
struct pt {
  long double x, y;
  inline bool operator<(pt b) const {
    if (fabs(x - b.x) > eps) return x < b.x;
    if (fabs(y - b.y) > eps) return y < b.y;
    return false;
  }
  inline pt rotate(long double t1, long double t2) {
    long double x1 = x * t1 - y * t2, y1 = x * t2 + y * t1;
    x = x1;
    y = y1;
    return *this;
  }
};
inline pt operator+(pt a, pt b) { return (pt){a.x + b.x, a.y + b.y}; }
inline pt operator-(pt a, pt b) { return (pt){a.x - b.x, a.y - b.y}; }
inline pt operator*(pt a, long double r) { return (pt){a.x * r, a.y * r}; }
inline long double dot(pt a, pt b) { return a.x * b.x + a.y * b.y; }
inline pt I(pt p) { return p * (1.0 / sqrt(dot(p, p))); }
inline vector<pt> ist(pt p, pt q, long double r1, long double r2) {
  long double d = sqrt(dot(p - q, p - q));
  if (d > r1 + r2 + eps || d < fabs(r1 - r2) - eps) return vector<pt>();
  vector<pt> ans;
  long double t1 = (r1 * r1 + d * d - r2 * r2) / (2.0 * r1 * d),
              t2 = sqrt(1.0 - t1 * t1);
  ans.push_back(p + I(q - p).rotate(t1, t2) * r1);
  ans.push_back(p + I(q - p).rotate(t1, -t2) * r1);
  if (fabs(t2) < eps) ans.pop_back();
  return ans;
}
int n;
long double x[5], y[5], r[5];
bool flag[5], g[5][5];
set<pt> S, S1[5];
void dfs(int i) {
  flag[i] = true;
  for (int j = 0; j < n; ++j)
    if (i != j && !flag[j] && g[i][j]) dfs(j);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i] >> r[i];
  memset(g, 0, sizeof(g));
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j) {
      vector<pt> v = ist((pt){x[i], y[i]}, (pt){x[j], y[j]}, r[i], r[j]);
      for (int w = 0; w < v.size(); ++w) {
        S1[i].insert(v[w]);
        S1[j].insert(v[w]);
        S.insert(v[w]);
      }
      if (v.size()) g[i][j] = g[j][i] = true;
    }
  int ans = 1;
  for (int i = 0; i < n; ++i) ans += S1[i].size();
  ans -= S.size();
  memset(flag, 0, sizeof(flag));
  for (int i = 0; i < n; ++i)
    if (!flag[i]) dfs(i), ++ans;
  cout << ans << endl;
  return 0;
}
