#include <bits/stdc++.h>
using namespace std;
int main(){
	int out=0;
	double cx1,cy1,r1;
	double cx2,cy2,r2;

	cin>>cx1>>cy1>>r1;
	cin>>cx2>>cy2>>r2;

	double d=sqrt((cx1-cx2)*(cx1-cx2)+(cy1-cy2)*(cy1-cy2));

	if( d > r1+r2 ) out = 4;
	else if( abs(d-r1-r2) < 1e-10 ) out = 3;
	else if( d>abs(r1-r2)+1e-10 ) out = 2;
	else if( abs(d-abs(r1-r2)) < 1e-10 ) out = 1;

	cout<< out <<endl;
}
