#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1E-9;
struct point {
  long double x, y;
  point() {}
  point(long double x, long double y) : x(x), y(y) {}
  void operator=(const point& p) { x = p.x, y = p.y; }
  bool operator==(const point& p1) { return (x == p1.x && y == p1.y); }
  bool operator<(const point& p) {
    if (x == p.x) return y < p.y;
    return x < p.x;
  }
  point operator+(const point& p) const {
    point pt(x + p.x, y + p.y);
    return pt;
  }
  point operator-(const point& p) const {
    point pt(x - p.x, y - p.y);
    return pt;
  }
  long double crossProduct(const point& p) const { return x * p.y - y * p.x; }
  long double dotProduct(const point& p) const { return x * p.x + y * p.y; }
  long double dist() { return (x * x + y * y); }
};
struct line {
  long double a, b, c;
  line(long double x, long double y, long double z) {
    a = x;
    b = y;
    c = z;
  }
  line() {}
  line(point A, point B) {
    a = A.y - B.y;
    b = B.x - A.x;
    c = -a * (A.x) - b * (A.y);
  }
  long double findX(long double y) {
    if (a == 0) return 1e9;
    return (-c - b * y) / ((long double)a);
  }
  long double findY(long double x) {
    if (b == 0) return 1e9;
    return (-c - a * x) / ((long double)b);
  }
  long double det(long double p, long double q, long double r, long double s) {
    return (p * s - q * r);
  }
  point intersect(const line& l2) const {
    long double x = l2.a;
    long double y = l2.b;
    long double z = l2.c;
    if ((a * y - b * x) == 0) return point(1e9, 1e9);
    long double val = (a * y - b * x);
    return point(-(c * y - b * z) / val, -(a * z - c * x) / val);
  }
};
struct circle {
  point centre;
  long double r;
  circle() {}
  circle(const point& x, const long double& c) { centre = x, r = c; }
  vector<point> line_intersect(line& l) {
    long double c = (l.c) + (l.a) * (centre.x) + (l.b) * (centre.y);
    long double a = (l.a), b = (l.b);
    long double x0 = -a * c / (a * a + b * b), y0 = -b * c / (a * a + b * b);
    vector<point> ans;
    if (c * c > r * r * (a * a + b * b))
      return ans;
    else if (c * c == r * r * (a * a + b * b))
      ans.push_back(point(x0, y0));
    else {
      long double d = r * r - c * c / (a * a + b * b);
      long double mult = sqrt(d / (a * a + b * b));
      long double ax, ay, bx, by;
      ax = x0 + b * mult;
      bx = x0 - b * mult;
      ay = y0 - a * mult;
      by = y0 + a * mult;
      ans.push_back(point(ax, ay));
      ans.push_back(point(bx, by));
    }
    for (point& it : ans) it = it + centre;
    return ans;
  }
  vector<point> circle_intersect(circle& C) {
    long double x2 = (C.centre.x), y2 = (C.centre.y), r2 = (C.r);
    x2 -= (centre.x);
    y2 -= (centre.y);
    line l = line(-2 * x2, -2 * y2, x2 * x2 + y2 * y2 + r * r - r2 * r2);
    vector<point> ans = circle(point(0, 0), r).line_intersect(l);
    for (point& it : ans) it = it + centre;
    return ans;
  }
  void tangents(point c, long double r1, long double r2, vector<line>& ans) {
    long double r = r2 - r1;
    long double z = (c.x) * (c.x) + (c.y) * (c.y);
    long double d = z - r * r;
    if (d < -EPS) return;
    d = sqrt(abs(d));
    line l;
    l.a = (c.x * r + c.y * d) / z;
    l.b = (c.y * r - c.x * d) / z;
    l.c = r1;
    ans.push_back(l);
  }
  vector<line> tangents(circle b) {
    vector<line> ans;
    for (int i = -1; i <= 1; i += 2)
      for (int j = -1; j <= 1; j += 2)
        tangents((b.centre) - centre, r * i, (b.r) * j, ans);
    for (int i = 0; i < ans.size(); ++i)
      ans[i].c -= ans[i].a * centre.x + ans[i].b * centre.y;
    return ans;
  }
  bool check(point& p1) {
    if ((p1 - centre).dist() >= (r * r) - EPS &&
        (p1 - centre).dist() <= (r * r) + EPS)
      return true;
    return false;
  }
};
long double sqr(long double val) { return val * val; }
vector<int> adj[4];
bool visited[4];
void dfs(int node) {
  visited[node] = true;
  for (auto it : adj[node]) {
    if (!visited[it]) dfs(it);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  point arr[4];
  long double r[4];
  int n;
  cin >> n;
  for (int i = int(1); i <= int(n); i++) cin >> arr[i].x >> arr[i].y >> r[i];
  int mask = 0;
  if (n == 1) {
    cout << 2;
    return 0;
  }
  if ((arr[1] - arr[2]).dist() > sqr(r[1] - r[2])) {
    if ((arr[1] - arr[2]).dist() < sqr(r[1] + r[2])) mask |= 1;
  }
  if (n == 2) {
    cout << n + mask + 1;
    return 0;
  }
  for (int i = int(1); i <= int(3); i++) {
    for (int j = int(i + 1); j <= int(3); j++) {
      if ((arr[i] - arr[j]).dist() >= sqr(r[i] - r[j])) {
        if ((arr[i] - arr[j]).dist() <= sqr(r[i] + r[j])) {
          adj[i].push_back(j);
          adj[j].push_back(i);
        }
      }
    }
  }
  int ct = 0;
  for (int i = int(1); i <= int(3); i++) {
    if (!visited[i]) {
      ct++;
      dfs(i);
    }
  }
  int v = 0, e = 0;
  vector<point> s;
  for (int i = int(1); i <= int(3); i++) {
    for (int j = int(i + 1); j <= int(3); j++) {
      circle c1 = circle(arr[i], r[i]);
      circle c2 = circle(arr[j], r[j]);
      vector<point> x = c1.circle_intersect(c2);
      for (auto it : x) s.push_back(it);
    }
  }
  vector<point> vt;
  for (int i = int(0); i <= int(s.size() - 1); i++) {
    vt.push_back(s[i]);
    for (int j = int(i + 1); j <= int(s.size() - 1); j++) {
      if ((s[i] - s[j]).dist() < EPS) {
        vt.pop_back();
        break;
      }
    }
  }
  s = vt;
  v = s.size();
  for (int i = int(1); i <= int(3); i++) {
    for (auto it : s) {
      if (circle(arr[i], r[i]).check(it)) e++;
    }
  }
  cout << (e - v + ct + 1);
}
