#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  return a ? gcd(b % a, a) : b;
}
template <typename T>
T lcm(T a, T b) {
  return (a / gcd(a, b)) * b;
}
bool is_down(char x) { return ('a' <= x && x <= 'z'); }
bool is_upper(char x) { return ('A' <= x && x <= 'Z'); }
bool is_digit(char x) { return ('0' <= x && x <= '9'); }
const long double pi = 3.141592653589793238462643383279;
const long double log23 = 1.58496250072115618145373894394781;
const long double eps = 1e-7;
const long double zero = 0;
const long long INF = 1e18;
const int COUT = 30;
const int prost = 239;
const long long prost64 = 239;
const int two = 2;
const int thr = 3;
const long long sr = 31;
const long long MOD = 1e9 + 7;
const int BIG = 2 * 1e9 + 1;
const int alf = 26;
const int MAX_N = 2 * 1e5 + 1;
const int MAX_M = 2001;
const int MAX_T = (1 << 20);
const int B = trunc(sqrt(MAX_N)) + 1;
const int MAX_LOG = 19;
const int km = (1 << 18);
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, 1, 0, -1};
const int dxo[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dyo[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
const int bit_max = 32;
const int dig = 10;
const string str_alf = "abcdefghijklmnopqrstuvwxyz";
const string str_alf_big = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const int day[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
const int digarr[10] = {6, 2, 5, 5, 4, 5, 6, 3, 7, 6};
const int bt = 31;
struct point {
  long double x, y;
  point() { x = y = 0; }
  point(long double a, long double b) {
    x = a;
    y = b;
  }
  bool operator==(const point &p) const {
    return (fabs(x - p.x) < eps && fabs(y - p.y) < eps);
  }
  long double polar() { return atan2(y, x); }
};
struct vect {
  long double x, y;
  vect() { x = y = 0; }
  vect(point a, point b) {
    x = b.x - a.x;
    y = b.y - a.y;
  }
  vect(long double a, long double b) {
    x = a;
    y = b;
  }
  bool operator==(const vect &p) const {
    return (fabs(x - p.x) < eps && fabs(y - p.y) < eps);
  }
  vect operator+(const vect &v) {
    vect ans;
    ans.x = x + v.x;
    ans.y = y + v.y;
    return ans;
  }
  long double operator*(const vect &v) const { return x * v.x + y * v.y; }
  long double operator^(const vect &v) const { return x * v.y - y * v.x; }
  vect operator*(const long double &k) const {
    vect v;
    v.x = x * k;
    v.y = y * k;
    return v;
  }
  long double leng() { return sqrt(x * x + y * y); }
  vect contr() {
    vect v;
    v.x = -y;
    v.y = x;
    return v;
  }
};
struct line {
  long double a, b, c;
  line() { a = b = c = 0; }
  line(point p, vect v) {
    a = -v.y;
    b = v.x;
    c = v.y * p.x - v.x * p.y;
  }
  line(long double x, long double y, long double z) {
    a = x;
    b = y;
    c = z;
  }
  bool operator==(const line &l) const {
    return (fabs(a - l.a) < eps && fabs(b - l.b) < eps && fabs(c - l.c) < eps);
  }
  vect napr() {
    vect v;
    v.x = -b;
    v.y = a;
    return v;
  }
  vect norm() {
    vect v;
    v.x = a;
    v.y = b;
    return v;
  }
  bool is(point p) { return (fabs(a * p.x + b * p.y + c) < eps); }
  long double height(point p) {
    return fabs(p.x * a + p.y * b + c) / sqrt(a * a + b * b);
  }
  long double f(point p) { return (a * p.x + b * p.y + c); }
  point rand_point() {
    point p;
    p.x = -(c * a) / (a * a + b * b);
    p.y = -(c * b) / (a * a + b * b);
    return p;
  }
};
struct circle {
  point p;
  long double r;
  circle() {
    p = point(0, 0);
    r = 0;
  }
  circle(point x, long double t) {
    p = x;
    r = t;
  }
  bool operator==(const circle &l) const {
    return (p == l.p && fabs(r - l.r) < eps);
  }
  long double sqr(long double a) { return (a * r * r) / 2; }
  bool check_good() { return r > eps; }
  long double len(long double a) { return a * r; }
  long double degree(point c) {
    long double len = (c.x - p.x) * (c.x - p.x) + (c.y - p.y) * (c.y - p.y);
    return len - r * r;
  }
  bool in(point t) {
    vect v = vect(p, t);
    return (v.leng() < r + eps);
  }
  int pos(point t) {
    long double d = degree(t);
    if (fabs(d) < eps) return 1;
    if (d < 0) return 0;
    return 2;
  }
};
bool cmp_polar(point p1, point p2) {
  vect v1 = vect(point(0, 0), p1);
  vect v2 = vect(point(0, 0), p2);
  if (fabs((v1 ^ v2)) > eps)
    return 0 < (v1 ^ v2);
  else
    return (v1 * v1) < (v2 * v2);
}
struct polygon {
  int n;
  vector<point> p;
  polygon() { n = 0; }
  polygon(vector<point> v) {
    p = v;
    n = v.size();
  }
  long double square() {
    vector<vect> v;
    for (int i = 0; i < n; i++) v.push_back(vect(point(0, 0), p[i]));
    long double ans = 0;
    for (int i = 0; i < n - 1; i++) ans += v[i] ^ v[i + 1];
    ans += v[n - 1] ^ v[0];
    ans /= 2;
    return fabs(ans);
  }
  long double length() {
    long double ans = 0;
    for (int i = 0; i < n - 1; i++) ans += vect(p[i], p[i + 1]).leng();
    ans += vect(p[n - 1], p[0]).leng();
    return ans;
  }
  void go(vect v) {
    for (int i = 0; i < n; i++) p[i].x += v.x, p[i].y += v.y;
  }
  long double dist(point r) {
    long double ans = -1;
    for (int i = 0; i < n; i++) ans = max(ans, vect(r, p[i]).leng());
    return ans;
  }
  polygon convex_hull() {
    point to = p[0];
    for (int i = 0; i < n; i++)
      if (p[i].y < to.y || (fabs(p[i].y - to.y) < eps && p[i].x < to.x))
        to = p[i];
    go(vect(to, point(0, 0)));
    sort(p.begin(), p.end(), cmp_polar);
    vector<point> s;
    s.push_back(p[0]);
    s.push_back(p[1]);
    for (int i = 2; i < n; i++) {
      while (s.size() > 1 && (vect(s[s.size() - 2], s[s.size() - 1]) ^
                              vect(s[s.size() - 2], p[i])) < 0)
        s.pop_back();
      s.push_back(p[i]);
    }
    polygon r = polygon(s);
    r.go(vect(point(0, 0), to));
    return r;
  }
};
istream &operator>>(istream &input_stream, point &a) {
  input_stream >> a.x >> a.y;
  return input_stream;
}
ostream &operator<<(ostream &output_stream, point &a) {
  output_stream << a.x << " " << a.y << "\n";
  return output_stream;
}
istream &operator>>(istream &input_stream, vect &a) {
  input_stream >> a.x >> a.y;
  return input_stream;
}
ostream &operator<<(ostream &output_stream, vect &a) {
  output_stream << a.x << " " << a.y << "\n";
  return output_stream;
}
istream &operator>>(istream &input_stream, line &a) {
  input_stream >> a.a >> a.b >> a.c;
  return input_stream;
}
ostream &operator<<(ostream &output_stream, line &a) {
  output_stream << a.a << " " << a.b << " " << a.c << "\n";
  return output_stream;
}
istream &operator>>(istream &input_stream, circle &a) {
  input_stream >> a.p.x >> a.p.y >> a.r;
  return input_stream;
}
ostream &operator<<(ostream &output_stream, circle &a) {
  output_stream << a.p.x << " " << a.p.y << " " << a.r << "\n";
  return output_stream;
}
istream &operator>>(istream &input_stream, polygon &p) {
  input_stream >> p.n;
  p.p.resize(p.n);
  for (int i = 0; i < p.n; i++) input_stream >> p.p[i];
  return input_stream;
}
ostream &operator<<(ostream &output_stream, polygon &p) {
  output_stream << p.n << "\n";
  for (int i = 0; i < p.n; i++) output_stream << p.p[i];
  return output_stream;
}
long double deg_to_rad(long double a);
long double rad_to_deg(long double a);
point read_point_polar();
vect radius_v(point p);
long double polar_angle(point p);
point point_napr(long double a);
long double angle_vect(vect a, vect b);
long double length(point p1, point p2);
line line_point(point p1, point p2);
point go(point p, vect v);
line go_line(line l, vect v);
vect do_len(long double len, vect v);
bool cmp_polar(point p1, point p2);
bool is_in_luch(point p1, point vn, point vk);
bool is_in_one_side(line l, point p1, point p2);
bool is_in_otr(point p, point vn, point vk);
long double dist_to_otr(point p, point vn, point vk);
int kol_intersec_line_line(line l1, line l2);
point intersection_line_line(line l1, line l2);
line centr_perp(point p1, point p2);
point otnosh(point a, point b, long double m, long double n);
line biss(point a, point b, point c);
line median(point a, point b, point c);
line heig(point p, line l);
point perp(point p, line l);
point simm(point p, line l);
circle in_circle(point a, point b, point c);
circle out_circle(point a, point b, point c);
int kol_intersec_circle_line(circle c, line l);
pair<point, point> intersection_circle_line(circle c, line l);
line rad_os(circle c1, circle c2);
int kol_intersec_circle_circle(circle c1, circle c2);
pair<point, point> intersection_circle_circle(circle c1, circle c2);
int kol_tangent(circle c, point p);
pair<point, point> tangent(circle c, point p);
line tangent_point(circle c, point p);
long double square_treug(point a, point b, point c);
long double square_treug_stor(long double a, long double b, long double c);
polygon treug(point a, point b, point c);
bool in_polygon_easy(point p, polygon t);
long double deg_to_rad(long double a) { return (a / 180) * pi; }
long double rad_to_deg(long double a) { return (a / pi) * 180; }
point read_point_polar() {
  long double r, a;
  cin >> r >> a;
  a = deg_to_rad(a);
  return point(r * cos(a), r * sin(a));
}
long double angle_vect(vect a, vect b) {
  long double an = atan2(a ^ b, a * b);
  return fabs(an);
}
vect radius_v(point p) { return vect(point(0, 0), p); }
long double polar_angle(point p) {
  vect xn = radius_v(point(1, 0));
  vect yn = radius_v(point(0, 1));
  if (p.x >= 0 && p.y >= 0) return angle_vect(radius_v(p), xn);
  if (p.x >= 0 && p.y < 0)
    return (3 * pi) / 2 + angle_vect(yn * (-1), radius_v(p));
  if (p.x < 0 && p.y < 0) return pi + angle_vect(xn * (-1), radius_v(p));
  return pi / 2 + angle_vect(yn, radius_v(p));
}
long double length(point p1, point p2) { return vect(p1, p2).leng(); }
point point_napr(long double a) {
  point p = point(cos(a), sin(a));
  vect v = vect(point(0, 0), p);
  return go(point(0, 0), v);
}
line line_point(point p1, point p2) { return line(p1, vect(p1, p2)); }
point go(point p, vect v) { return point(p.x + v.x, p.y + v.y); }
line go_line(line l, vect v) {
  vect n = l.napr();
  point p = l.rand_point();
  point ne = go(p, v);
  return line(ne, n);
}
vect do_len(long double len, vect v) {
  long double r = v.leng();
  return vect(v.x * len / r, v.y * len / r);
}
bool is_in_luch(point p1, point vn, point vk) {
  long double r = vect(vn, p1).leng();
  vect v = vect(vn, vk);
  line l = line(vn, v);
  if (!l.is(p1)) return false;
  v = do_len(r, v);
  point p = go(vn, v);
  return (p == p1);
}
bool is_in_one_side(line l, point p1, point p2) {
  if (l.is(p1) || l.is(p2)) return true;
  return (!((l.f(p1) < 0) ^ (l.f(p2) < 0)));
}
bool is_in_otr(point p, point vn, point vk) {
  return is_in_luch(p, vn, vk) && is_in_luch(p, vk, vn);
}
long double dist_to_otr(point p, point vn, point vk) {
  line l = line_point(vn, vk);
  if (l.is(p)) {
    if (is_in_otr(p, vn, vk)) return 0;
    return min(length(p, vn), length(p, vk));
  }
  point osn = perp(p, l);
  if (is_in_otr(osn, vn, vk)) return length(p, osn);
  return min(length(p, vn), length(p, vk));
}
int kol_intersec_line_line(line l1, line l2) {
  long double d = l1.a * l2.b - l1.b * l2.a;
  long double dx = -l1.c * l2.b + l2.c * l1.b;
  long double dy = -l1.a * l2.c + l2.a * l1.c;
  if (fabs(d) < eps && fabs(dx) < eps && fabs(dy) < eps) return 2;
  if (fabs(d) < eps) return 0;
  return 1;
}
point intersection_line_line(line l1, line l2) {
  long double d = l1.a * l2.b - l1.b * l2.a;
  long double dx = -l1.c * l2.b + l2.c * l1.b;
  long double dy = -l1.a * l2.c + l2.a * l1.c;
  return point(dx / d, dy / d);
}
line centr_perp(point p1, point p2) {
  vect v = vect(p1, p2);
  v = vect(v.y, -v.x);
  point m = point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2);
  return line(m, v);
}
point otnosh(point a, point b, long double m, long double n) {
  long double s = m + n;
  return point((m * a.x + n * b.x) / s, (m * a.y + n * b.y) / s);
}
line biss(point a, point b, point c) {
  vect v1 = vect(b, a);
  vect v2 = vect(b, c);
  v1 = do_len(1, v1);
  v2 = do_len(1, v2);
  vect v = v1 + v2;
  if (v.leng() < eps) return line(b, line_point(b, a).norm());
  return line(b, v);
}
line median(point a, point b, point c) {
  point s = otnosh(a, c, 1, 1);
  return line_point(b, s);
}
point perp(point p, line l) { return intersection_line_line(l, heig(p, l)); }
point simm(point p, line l) {
  point g = perp(p, l);
  vect v = vect(p, g);
  return go(g, v);
}
line heig(point p, line l) { return line(p, l.norm()); }
circle in_circle(point a, point b, point c) {
  circle ans;
  ans.p = intersection_line_line(biss(a, b, c), biss(b, a, c));
  ans.r = line_point(a, b).height(ans.p);
  return ans;
}
circle out_circle(point a, point b, point c) {
  line l1 = centr_perp(a, b);
  line l2 = centr_perp(a, c);
  circle ans;
  ans.p = intersection_line_line(l1, l2);
  ans.r = vect(ans.p, a).leng();
  return ans;
}
int kol_intersec_circle_line(circle c, line l) {
  long double h = l.height(c.p);
  if (fabs(h - c.r) < eps) return 1;
  return (c.r > h ? 2 : 0);
}
pair<point, point> intersection_circle_line(circle c, line l) {
  long double h = l.height(c.p);
  long double q = sqrt(c.r * c.r - h * h);
  point p = perp(c.p, l);
  vect go1 = do_len(q, l.napr());
  vect go2 = go1 * (-1);
  return make_pair(go(p, go1), go(p, go2));
}
line rad_os(circle c1, circle c2) {
  line l;
  l.a = 2 * (c2.p.x - c1.p.x);
  l.b = 2 * (c2.p.y - c1.p.y);
  l.c = c1.p.x * c1.p.x + c1.p.y * c1.p.y - c2.p.x * c2.p.x - c2.p.y * c2.p.y +
        c2.r * c2.r - c1.r * c1.r;
  return l;
}
int kol_intersec_circle_circle(circle c1, circle c2) {
  line l = rad_os(c1, c2);
  if (l.napr() == vect(0, 0) && fabs(c1.r - c2.r) < eps)
    return 3;
  else if (l.napr() == vect(0, 0))
    return 0;
  return kol_intersec_circle_line(c1, l);
}
pair<point, point> intersection_circle_circle(circle c1, circle c2) {
  return intersection_circle_line(c1, rad_os(c1, c2));
}
int kol_tangent(circle c, point p) {
  long double deg = c.degree(p);
  if (fabs(deg) < eps) return 1;
  if (deg < 0) return 0;
  return 2;
}
line tangent_point(circle c, point p) {
  long double a = p.x - c.p.x;
  long double b = p.y - c.p.y;
  return line(a, b, -c.r * c.r - a * c.p.x - b * c.p.y);
}
pair<point, point> tangent(circle c, point p) {
  long double deg = c.degree(p);
  circle n = circle(p, sqrt(deg));
  return intersection_circle_circle(n, c);
}
long double square_treug(point a, point b, point c) {
  return treug(a, b, c).square();
}
long double square_treug_stor(long double a, long double b, long double c) {
  long double p = (a + b + c) / 2;
  return sqrt(p * (p - a) * (p - b) * (p - c));
}
polygon treug(point a, point b, point c) {
  vector<point> y;
  y.push_back(a);
  y.push_back(b);
  y.push_back(c);
  return y;
}
bool in_polygon_easy(point p, polygon t) {
  vector<polygon> v;
  for (int i = 0; i < t.n - 1; i++) v.push_back(treug(t.p[i], t.p[i + 1], p));
  long double sq = t.square();
  long double now = 0;
  for (int i = 0; i < v.size(); i++) now += v[i].square();
  return fabs(sq - now) < eps;
}
struct dsu {
  vector<int> parent, r;
  dsu() { parent = r = {}; }
  dsu(int n) {
    parent.resize(n);
    r.resize(n);
    for (int i = 0; i < n; i++) parent[i] = i, r[i] = 0;
  }
  int find_set(int a) {
    if (parent[a] == a) return a;
    return parent[a] = find_set(parent[a]);
  }
  void merge_set(int a, int b) {
    a = find_set(a);
    b = find_set(b);
    if (a == b) return;
    if (r[a] >= r[b]) swap(a, b);
    parent[a] = b;
    if (r[a] == r[b]) r[b]++;
  }
  bool is_connect(int a, int b) { return find_set(a) == find_set(b); }
};
bool cmp(point a, point b) {
  if (a == b) return false;
  if (fabs(a.x - b.x) < eps) return (a.y < b.y);
  return (a.x < b.x);
}
int main() {
  cin.sync_with_stdio(0);
  int n;
  cin >> n;
  vector<circle> c(n);
  for (int i = 0; i < n; i++) cin >> c[i];
  vector<point> p;
  for (int i = 0; i < n; i++) {
    p.push_back(point(c[i].p.x - c[i].r, c[i].p.y));
    p.push_back(point(c[i].p.x + c[i].r, c[i].p.y));
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      int kol = kol_intersec_circle_circle(c[i], c[j]);
      if (kol == 0 || kol == 3) continue;
      pair<point, point> nw = intersection_circle_circle(c[i], c[j]);
      p.push_back(nw.first);
      if (kol == 2) p.push_back(nw.second);
    }
  sort(p.begin(), p.end(), cmp);
  p.resize(unique(p.begin(), p.end()) - p.begin());
  int ans = 1;
  dsu w = dsu(p.size());
  for (int i = 0; i < n; i++) {
    vector<int> id;
    for (int j = 0; j < p.size(); j++)
      if (c[i].pos(p[j]) == 1) id.push_back(j);
    ans += (int)id.size();
    for (int j = 0; j < (int)id.size() - 1; j++) w.merge_set(id[j], id[j + 1]);
  }
  for (int i = 0; i < w.parent.size(); i++) ans += (i == w.parent[i]);
  ans -= (int)p.size();
  cout << ans;
  return 0;
}
