#include <iostream>
#include <math.h>
#include <complex>

using namespace std;

int main() {
	int x1, y1, r1;
	int x2, y2, r2;
	
	cin >> x1 >> y1 >> r1;
	cin >> x2 >> y2 >> r2;
	
	int X = sqrt(pow(x1-x2, 2) + pow(y1-y2, 2));
	
	if(r1+r2 < X){
		cout << 4 << endl;
	} else if(X == r1+r2){
		cout << 3 << endl;
	} else if(abs(r1-r2) < X){
		cout << 2 << endl;
	} else if(X == abs(r1-r2)){
		cout << 1 << endl;
	} else{
		cout << 0 << endl;
	}
	
	return 0;
}
