#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(){
  int c1x,c1y,c1r;
  int c2x,c2y,c2r;
  int lr,sr;

  double dis;

  scanf("%d %d %d",&c1x,&c1y,&c1r);
  scanf("%d %d %d",&c2x,&c2y,&c2r);


  if(c1x>=c2x && c1y>=c2y){
    dis = sqrt((c1x-c2x)*(c1x-c2x)+(c1y-c2y)*(c1y-c2y));
  }
  else if(c1x>=c2x && c2y>=c1y){
    dis = sqrt((c1x-c2x)*(c1x-c2x)+(c2y-c1y)*(c2y-c1y));
  }
  else if(c2x>=c1x && c1y>=c2y){
    dis = sqrt((c2x-c1x)*(c2x-c1x)+(c1y-c2y)*(c1y-c2y));
  }else{
    dis = sqrt((c2x-c1x)*(c2x-c1x)+(c2y-c1y)*(c2y-c1y));
  }

  if(c1r>=c2r){
    lr = c1r;
    sr = c2r;
  }else{
  lr = c2r;
  sr = c1r;
}


  if(lr+sr < dis){
    printf("%d\n",4);
  }
  else if(lr+sr == dis){
    printf("%d\n",3);
  }
  else if(lr+sr > dis && lr-sr < dis){
    printf("%d\n",2);
  }
  else if(lr-sr == dis){
    printf("%d\n",1);
  }
  else if(lr-sr > dis)
    printf("%d\n",0);
  }

