#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const double EPS = 1e-9;
struct circle {
  long long x, y, r;
} c[3];
long long n;
vector<pair<double, double> > vec;
bool equ(pair<double, double> p1, pair<double, double> p2) {
  double x1 = p1.first, y1 = p1.second;
  double x2 = p2.first, y2 = p2.second;
  return fabs(x1 - x2) < EPS && fabs(y1 - y2) < EPS;
}
long long pow2(long long x) { return x * x; }
bool in(circle c1, circle c2) {
  int x1 = c1.x, y1 = c1.y, r1 = c1.r;
  int x2 = c2.x, y2 = c2.y, r2 = c2.r;
  int d1 = pow2(r1 - r2);
  int d2 = pow2(x1 - x2) + pow2(y1 - y2);
  return d1 > d2;
}
bool out(circle c1, circle c2) {
  int x1 = c1.x, y1 = c1.y, r1 = c1.r;
  int x2 = c2.x, y2 = c2.y, r2 = c2.r;
  int d1 = pow2(r1 + r2);
  int d2 = pow2(x1 - x2) + pow2(y1 - y2);
  return d1 < d2;
}
bool Insec(circle c1, circle c2) {
  long long x1 = c1.x, y1 = c1.y, r1 = c1.r;
  long long x2 = c2.x, y2 = c2.y, r2 = c2.r;
  if (x1 == x2 && y1 == y2) return false;
  const long long con =
      pow2(x2) + pow2(y2) + pow2(r1) - pow2(x1) - pow2(y1) - pow2(r2);
  if (x1 == x2) {
    long long a = 4 * (pow2(y2 - y1) + pow2(x2 - x1));
    long long b =
        4 * (x1 - x2) * (con - 2 * (y2 - y1) * y1) - 8 * x1 * pow2(y2 - y1);
    long long c = 4 * pow2(y2 - y1) * pow2(x1) +
                  pow2(con - 2 * (y2 - y1) * y1) - pow2(r1) * 4 * pow2(y2 - y1);
    long long det = b * b - 4 * a * c;
    if (det < 0) {
      return false;
    } else if (!det) {
      double _x1 = 1.0 * (-b) / (2 * a);
      double _y1 = (2 * (x1 - x2) * _x1 + con) / (2 * (y2 - y1));
      vec.push_back(make_pair(_x1, _y1));
    } else {
      double sqr_det = sqrt(det);
      double _x1 = 1.0 * (-b + sqr_det) / (2 * a);
      double _x2 = 1.0 * (-b - sqr_det) / (2 * a);
      double _y1 = (2 * (x1 - x2) * _x1 + con) / (2 * (y2 - y1));
      double _y2 = (2 * (x1 - x2) * _x2 + con) / (2 * (y2 - y1));
      vec.push_back(make_pair(_x1, _y1));
      vec.push_back(make_pair(_x2, _y2));
    }
  } else {
    long long a = 4 * (pow2(x2 - x1) + pow2(y2 - y1));
    long long b =
        4 * (y1 - y2) * (con - 2 * (x2 - x1) * x1) - 8 * y1 * pow2(x2 - x1);
    long long c = 4 * pow2(x2 - x1) * pow2(y1) +
                  pow2(con - 2 * (x2 - x1) * x1) - pow2(r1) * 4 * pow2(x2 - x1);
    long long det = b * b - 4 * a * c;
    if (det < 0) {
      return false;
    } else if (!det) {
      double _y1 = 1.0 * (-b) / (2 * a);
      double _x1 = (2 * (y1 - y2) * _y1 + con) / (2 * (x2 - x1));
      vec.push_back(make_pair(_x1, _y1));
    } else {
      double sqr_det = sqrt(det);
      double _y1 = 1.0 * (-b + sqr_det) / (2 * a);
      double _y2 = 1.0 * (-b - sqr_det) / (2 * a);
      double _x1 = (2 * (y1 - y2) * _y1 + con) / (2 * (x2 - x1));
      double _x2 = (2 * (y1 - y2) * _y2 + con) / (2 * (x2 - x1));
      vec.push_back(make_pair(_x1, _y1));
      vec.push_back(make_pair(_x2, _y2));
    }
  }
  return true;
}
int main() {
  scanf("%d", &n);
  for (long long i = 0; i < n; ++i) {
    scanf("%lld%lld%lld", &c[i].x, &c[i].y, &c[i].r);
  }
  long long ans = 2;
  for (long long i = 1; i < n; ++i) {
    vec.clear();
    int flag = 1;
    for (long long j = 0; j < i; ++j) {
      if (!Insec(c[i], c[j])) {
        flag = 0;
      }
    }
    sort(vec.begin(), vec.end());
    long long tt = vec.size();
    for (long long j = 0; j < (long long)vec.size() - 1; ++j) {
      if (equ(vec[j], vec[j + 1])) --tt;
    }
    if (i == 2 && (in(c[0], c[1]) || out(c[0], c[1])) && flag) --tt;
    ans += max(tt, 1ll);
  }
  printf("%d", ans);
  return 0;
}
