#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-6;
struct Point {
  long double x, y;
  Point(long double ix = 0.0, long double iy = 0.0) {
    x = ix;
    y = iy;
  }
  Point operator*(long double k) { return Point(k * x, k * y); }
  Point operator/(long double k) { return Point(x / k, y / k); }
  Point operator+(Point a) { return Point(x + a.x, y + a.y); }
  Point operator-(Point a) { return Point(x - a.x, y - a.y); }
  Point getPerp() { return Point(y, -x); }
  bool operator==(const Point &a) const {
    return abs(x - a.x) < EPS && abs(y - a.y) < EPS;
  }
  bool operator<(const Point &a) const {
    return (abs(x - a.x) < EPS) ? (y < a.y) : (x < a.x);
  }
};
struct Circle {
  Point p;
  long double r;
};
inline long double dist(Point a, Point b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
inline void intersect(Circle a, Circle b, vector<Point> &v) {
  long double d = dist(a.p, b.p);
  long double r1 = a.r, r2 = b.r;
  if (d > r1 + r2) return;
  if (d < abs(r1 - r2)) return;
  long double theta = acos((r1 * r1 + d * d - r2 * r2) / (2 * r1 * d));
  long double hei = r1 * sin(theta);
  Point dr = (b.p - a.p) / d;
  Point pt = a.p + dr * (r1 * cos(theta));
  v.push_back(pt + dr.getPerp() * hei);
  v.push_back(pt - dr.getPerp() * hei);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(32);
  int n;
  cin >> n;
  Circle a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i].p.x >> a[i].p.y >> a[i].r;
  }
  int edges = 0;
  int comps = 0;
  vector<Point> vec;
  for (int i = 0; i < n; i++) {
    vector<Point> v;
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      intersect(a[i], a[j], v);
    }
    sort(v.begin(), v.end());
    v.resize(unique(v.begin(), v.end()) - v.begin());
    for (auto x : v) {
      vec.push_back(x);
    }
    if (v.empty())
      comps++;
    else
      edges += v.size();
  }
  comps = min(comps + 1, n);
  sort(vec.begin(), vec.end());
  vec.resize(unique(vec.begin(), vec.end()) - vec.begin());
  int vertices = vec.size();
  cout << comps + 1 + edges - vertices << endl;
  return 0;
}
