#include <iostream>
#include <cmath>

using namespace std;

int find_circles_relationship(int x1, int y1, int r1, int x2, int y2, int r2){
	float center_distance = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
	float sum_radius = r1 + r2;
	float min_radius = min(r1, r2);
	float max_radius = max(r1, r2);

	int relationship;
	if(center_distance > sum_radius){
		relationship = 4;
	}else if(center_distance == sum_radius){
		relationship = 3;
	}else{
		if(min_radius + center_distance == max_radius){
			relationship = 1;
		}else if(min_radius + center_distance < max_radius){
			relationship = 0;
		}else{
			relationship = 2;
		}
	}
	return relationship;
}

int main(){
	int x1, y1, r1;
	int x2, y2, r2;
	cin >> x1 >> y1 >> r1;
	cin >> x2 >> y2 >> r2;
	cout << find_circles_relationship(x1, y1, r1, x2, y2, r2) << endl;
}
