#include <iostream>
#include <sstream>
#include <cstdio>
#include <stdlib.h>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
using namespace std;

int main(){
  int c[2][3],r,r_;
  double d;
  cin>>c[0][0]>>c[0][1]>>c[0][2];
  cin>>c[1][0]>>c[1][1]>>c[1][2];
  d = pow(pow((c[0][0]-c[1][0]),2) + pow(c[0][1]-c[1][1],2),0.5);
  r = c[0][2]+c[1][2];
  r_ = abs(c[0][2]-c[1][2]);
  //cout <<d<<" "<<r<<" "<<r_<<endl;
  if(d>r) cout<<"4"<<endl;
  else if (d == r) cout<<"3"<<endl;
  else if (r_ == d) cout<<"1"<<endl;
  else if (r_ < d && d < r) cout<<"2"<<endl;
  else if (r_ > d) cout<<"0"<<endl;
  //cout <<d<<" "<<r<<" "<<r_<<endl;
  return 0;
}

