#include <iostream>
#include <cmath>

using namespace std;

int check(double cx1, double cy1, double r1,
          double cx2, double cy2, double r2){

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

  if(distance == r1 + r2) return 3;
  if(distance == abs(r1 - r2)) return 1;
  if(abs(r1 - r2) < distance && distance < r1 + r2) return 2;
  if(distance > r1 + r2) return 4;
  if(distance < abs(r1 - r2)) return 0;
}

int main(){
  double cx1 = 0, cy1 = 0, r1 = 0;
  double cx2 = 0, cy2 = 0, r2 = 0;
  cin >> cx1;
  cin >> cy1;
  cin >> r1;

  cin >> cx2;
  cin >> cy2;
  cin >> r2;

  // cout << cx1 << " " << cy1 << " " << r1 << endl;
  // cout << cx2 << " " << cy2 << " " << r2 << endl;

  cout << check(cx1, cy1, r1, cx2, cy2, r2) << endl;

  return 0;
}

