#include <stdio.h>

int main(){
	int a,b,r,c,d,s;
	scanf("%d%d%d%d%d%d",&a,&b,&r,&c,&d,&s);
	int dist=(a-c)*(a-c)+(b-d)*(b-d);
	int ans;
	if(dist>(r+s)*(r+s))ans=4;
	else if(dist==(r+s)*(r+s))ans=3;
	else if(dist>(r-s)*(r-s))ans=2;
	else if(dist==(r-s)*(r-s))ans=1;
	else ans=0;
	printf("%d\n",ans);
}
