#include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
static const int SEPARETED = 4;
static const int CIRCUMSCRIBED = 3;
static const int INTERSECTED = 2;
static const int INSCRIBED = 1;
static const int INCLUDED = 0;
 
class Point{
	public:
		double x, y;
 
		Point(double x = 0, double y = 0): x(x), y(y) {}
 
		Point operator + (Point p){ return Point(x + p.x, y + p.y);}
		Point operator - (Point p){ return Point(x - p.x, y - p.y);}
		Point operator * (double a){ return Point(a * x, a * y);}
		Point operator / (double a){ return Point(x / a, y / a);}
 
		double abs(){ return sqrt(norm());}
		double norm(){ return x * x + y * y;}
 
		bool operator < (const Point &p) const{
			return x != p.x ? x < p.x : y < p.y;
		}
 
		bool operator == (const Point &p) const{
			return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
		}
};
class Circle{
	public:
		Point c;
		double r;
		Circle(Point c = Point(), double r = 0.0): c(c), r(r) {}
};
double getDistance(Point a, Point b){
	return (a - b).abs();
}
int intersection(Circle c1, Circle c2){
	double distanceBetweenCenter = getDistance(c1.c, c2.c);
	if(distanceBetweenCenter > c1.r + c2.r) return SEPARETED;
	if(equals(distanceBetweenCenter, c1.r + c2.r)) return CIRCUMSCRIBED;
	if(equals(distanceBetweenCenter, fabs(c1.r - c2.r))) return INSCRIBED;
	if(distanceBetweenCenter < fabs(c1.r - c2.r)) return INCLUDED;

	return INTERSECTED;
}

int main(){
	Circle c1, c2;
	cin >> c1.c.x >> c1.c.y >> c1.r;
	cin >> c2.c.x >> c2.c.y >> c2.r;
	cout << intersection(c1, c2) << endl;
	return 0;
}

