#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
const double EPS = 1e-9;

bool eq(double a, double b) {
	return abs(a - b) < EPS;
}

int main(void) {
	int x[2], y[2], r[2];
	for (int i = 0; i < 2; i++) cin >> x[i] >> y[i] >> r[i];
	double d = sqrt(pow(x[1] - x[0], 2) + pow(y[1] - y[0], 2));
	if (d > r[0] + r[1]) cout << 4 << endl;
	else if(eq(d, r[0] + r[1])) cout << 3 << endl;
	else {
		int r_small = min(r[0], r[1]);
		int r_large = max(r[0], r[1]);
		if (eq(r_small + d, r_large)) cout << 1 << endl;
		else if (r_small + d > r_large) cout << 2 << endl;
		else cout << 0 << endl;
	}
}

// r0 + r1 > d ==> r0 - d
