#include <bits/stdc++.h>
using namespace std;

//point
typedef complex<double> P;
namespace std {
	bool operator < (const P& a, const P& b) {
		return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
	}
	bool cmp_y(const P &a, const P &b){
		return a.imag() != b.imag() ? a.imag() < b.imag() : a.real() < b.real();
	}
}
double cross(const P& a, const P& b) {
	return imag(conj(a)*b);
}
double dot(const P& a, const P& b) {
	return real(conj(a)*b);
}
// circle
struct C {
	P p; double r;
	C(const P& p, double r) : p(p), r(r) {}
};

int intersectCC(const C& a, const C& b) {
	double dist = sqrt(norm(a.p-b.p)), r1 = a.r + b.r, r2 = abs(a.r - b.r);
	if(r1 < dist) return 4;		//??\?????????
	if(dist == r1) return 3;	//?????\
	if(r2 < dist && dist < r1) return 2; //?????????
	if(dist == r2) return 1; //?????\
	return 0;	//??????
}

int main() {
	double x1, y1, r1, x2, y2, r2;
	cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
	C c1(P{x1, y1}, r1), c2(P{x2, y2}, r2);
	cout << intersectCC(c1, c2) << endl;
}