#include <bits/stdc++.h>
using namespace std;
long long n, ans;
double x[5], y[5], r[5], lt = 1;
struct Node {
  double x, y;
  Node operator+(const Node &u) const { return (Node){x + u.x, y + u.y}; }
  Node operator-(const Node &u) const { return (Node){x - u.x, y - u.y}; }
  double operator*(const Node &u) const { return x * u.x + y * u.y; }
};
struct Xn {
  Node u, v;
};
inline double cj(Node u, Node v) { return u.x * v.y - u.y * v.x; }
inline double lenf(Node u, Node v) { return (u - v) * (u - v); }
inline double len(Node u, Node v) { return sqrt(lenf(u, v)); }
inline Node fz(Node u) { return (Node){-u.y, u.x}; }
inline Node move(Node u, Node v, double l) {
  double b = l / sqrt(v * v);
  return (Node){u.x + v.x * b, u.y + v.y * b};
}
inline void work(long long u, long long v) {
  double d =
      sqrt((x[u] - x[v]) * (x[u] - x[v]) + (y[u] - y[v]) * (y[u] - y[v]));
  if (d > r[u] + r[v] + 1e-8) {
    lt = 0;
    return;
  }
  if (d + 1e-8 > r[u] + r[v]) return;
  if (d + min(r[u], r[v]) + 1e-8 < max(r[u], r[v])) {
    lt = 0;
    return;
  }
  if (d + min(r[u], r[v]) < max(r[u], r[v]) + 1e-8) return;
  ans++;
}
inline void gd() {
  Node a, b, c, res;
  Xn xn;
  double d;
  a = (Node){x[1], y[1]};
  b = (Node){x[2], y[2]};
  c = (Node){x[3], y[3]};
  xn = (Xn){a, b - a};
  d = len(a, b);
  double t = (r[1] * r[1] - r[2] * r[2] + lenf(a, b)) / (d * 2.0);
  xn.u = move(xn.u, xn.v, t);
  xn.v = fz(xn.v);
  t = sqrt(r[1] * r[1] - t * t);
  res = move(xn.u, xn.v, t);
  if (abs(lenf(c, res) - r[3] * r[3]) < 1e-8) ans--;
  res = move(xn.u, xn.v, -t);
  if (fabs(t) > 1e-8 && abs(lenf(c, res) - r[3] * r[3]) < 1e-8) ans--;
}
int main() {
  long long i, j, t, b;
  cin >> n;
  ans = n + 1;
  for (i = 1; i <= n; i++) scanf("%lf%lf%lf", &x[i], &y[i], &r[i]);
  for (i = 1; i <= n; i++)
    for (j = i + 1; j <= n; j++) work(i, j);
  if (n == 3) gd();
  cout << ans + (lt && n == 3);
}
