#include <bits/stdc++.h>
using namespace std;
const long double E = 1e-7;
struct Circ {
  int first, second, r;
} T[3];
int kw(int a) { return a * a; }
int dist_sq(int ax, int ay, int bx, int by) {
  return kw(ax - bx) + kw(ay - by);
}
int circ_rel(Circ& a, Circ& b) {
  int d = dist_sq(a.first, a.second, b.first, b.second);
  int f = kw(a.r + b.r), g = kw(a.r - b.r);
  if (d > f) return 0;
  if (d == f) return 1;
  if (d < g) return 4;
  if (d == g) return 3;
  return 2;
}
int common_points(Circ& a, Circ& b) {
  int res = circ_rel(a, b) % 4;
  if (res == 3) res = 1;
  return res;
}
vector<pair<long double, long double> > intersection(Circ& O1, Circ& O2) {
  vector<pair<long double, long double> > res;
  if (circ_rel(O1, O2) % 4 == 0) return res;
  if (circ_rel(O1, O2) == 1) {
    int dx = O2.first - O1.first, dy = O2.second - O1.second;
    long double first = 1.0 * (dx * O1.r) / (O1.r + O2.r) + 1.0 * O1.first;
    long double second = 1.0 * (dy * O1.r) / (O1.r + O2.r) + 1.0 * O1.second;
    res.push_back(pair<long double, long double>(first, second));
    return res;
  }
  if (circ_rel(O1, O2) == 3) {
    int dx = O2.first - O1.first, dy = O2.second - O1.second,
        nom = (O1.r < O2.r ? -O1.r : O1.r);
    long double first = 1.0 * (dx * nom) / abs(O1.r - O2.r) + O1.first;
    long double second = 1.0 * (dy * nom) / abs(O1.r - O2.r) + O1.second;
    res.push_back(pair<long double, long double>(first, second));
    return res;
  }
  int a = O1.first, b = O1.second, c = O2.first, d = O2.second;
  int A = (c - a) * 2, B = (d - b) * 2;
  int C = kw(O2.r) - kw(O1.r) + kw(a) - kw(c) + kw(b) - kw(d);
  int p = kw(A) + kw(B), q = 2 * (A * B * b + A * C - a * kw(B));
  int r = kw(a * B) + kw(B * b + C) - kw(O1.r * B);
  long double del = sqrt(kw(q) - 4 * p * r);
  long double x1 = (-del - q) / (2.0 * p);
  long double x2 = (del - q) / (2.0 * p);
  long double y1, y2;
  if (B != 0)
    y1 = (x1 * A + C) / (-B), y2 = (x2 * A + C) / (-B);
  else {
    long double dy = sqrt(kw(O1.r) - kw(a + C / A));
    y1 = b - dy, y2 = b + dy;
  }
  res.push_back(pair<long double, long double>(x1, y1));
  res.push_back(pair<long double, long double>(x2, y2));
  return res;
}
bool has_friends(int i) {
  int j = (i + 1) % 3, k = (i + 2) % 3;
  return ((common_points(T[i], T[j]) | common_points(T[i], T[k])) != 0);
}
long double absld(long double a) { return a < 0 ? -a : a; }
bool contains(Circ& O, pair<long double, long double> p) {
  long double dx = p.first - O.first, dy = p.second - O.second;
  long double d = dx * dx + dy * dy;
  return absld(d - kw(O.r)) < E;
}
void print(vector<pair<long double, long double> > v) {
  for (pair<long double, long double> p : v)
    printf("[%.4Lf, %.4Lf]; ", p.first, p.second);
  printf("\n");
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++)
    scanf("%d%d%d", &T[i].first, &T[i].second, &T[i].r);
  if (n < 3) {
    int res = 0;
    if (n == 1)
      res = 2;
    else
      res = (circ_rel(T[0], T[1]) == 2 ? 4 : 3);
    printf("%d\n", res);
    return 0;
  }
  int c = 0;
  if (has_friends(0))
    c = (has_friends(1) and has_friends(2) ? 1 : 2);
  else
    c = (has_friends(1) ? 2 : 3);
  int com = 0;
  vector<pair<long double, long double> > ps = intersection(T[0], T[1]);
  for (pair<long double, long double> p : ps)
    if (contains(T[2], p)) com++;
  int e = 0;
  for (int i = 0; i < 3; i++) {
    int j = (i + 1) % 3, k = (i + 2) % 3;
    int curr_v = common_points(T[i], T[j]) + common_points(T[i], T[k]) - com;
    if (curr_v == 0) curr_v = 1;
    e += curr_v;
  }
  int v = common_points(T[0], T[1]) + common_points(T[1], T[2]) +
          common_points(T[2], T[0]) - com * 2 + (c == 3 ? 3 : c - 1);
  printf("%d\n", e - v + c + 1);
  return 0;
}
