#include <bits/stdc++.h>
using namespace std;
double EPS = 0.00000001;
int sign(double x){
	if (x > EPS){
		return 1;
	} else if (x < -EPS){
		return -1;
	} else {
		return 0;
	}
}
bool equals(double x, double y){
	return abs(x - y) < EPS;
}
struct point{
	double x;
	double y;
	point(){
		x = 0;
		y = 0;
	}
	point(double X, double Y){
		x = X;
		y = Y;
	}
	point operator +(){
		return point(x, y);
	}
	point operator -(){
		return point(-x, -y);
	}
	point operator +(point P){
		return point(x + P.x, y + P.y);
	}
	point operator -(point P){
		return point(x - P.x, y - P.y);
	}
	point& operator +=(point P){
		x += P.x;
		y += P.y;
		return *this;
	}
	point& operator -=(point P){
		x -= P.x;
		y -= P.y;
		return *this;
	}
	point operator *(double k){
		return point(x * k, y * k);
	}
	point operator /(double k){
		return point(x / k, y / k);
	}
	point& operator *=(double k){
		x *= k;
		y *= k;
		return *this;
	}
	point& operator /=(double k){
		x /= k;
		y /= k;
		return *this;
	}
	bool operator ==(point P){
		return equals(x, P.x) && equals(y, P.y);
	}
	bool operator !=(point P){
		return !(*this == P);
	}
	bool operator <(point P){
		return sign(P.x - x) == 1 || equals(x, P.x) && sign(P.y - y) == 1;
	}
	bool operator >(point P){
		return (P < *this);
	}
	point& rotate(double t){
	    double X = x * cos(t) - y * sin(t);
	    double Y = x * sin(t) + y * cos(t);
	    x = X;
	    y = Y;
	    return *this;
	}
	point& rotate(point P, double t){
	    *this -= P;
	    (*this).rotate(t);
	    *this += P;
	    return *this;
	}
	point& rotate90(){
	    swap(x, y);
	    x = -x;
	    return *this;
	}
};
istream& operator >>(istream &is, point &p){
	double x, y;
	is >> x >> y;
	p = point(x, y);
	return is;
}
ostream& operator <<(ostream &os, point p){
	os << p.x << ' ' << p.y;
	return os;
}
double norm(point P){
	return P.x * P.x + P.y * P.y;
}
double abs(point P){
	return sqrt(norm(P)); 
}
double dot(point P, point Q){
	return P.x * Q.x + P.y * Q.y;
}
double cross(point P, point Q){
  return P.x * Q.y - P.y * Q.x;
}
double dist(point P, point Q){
	return abs(P - Q);
}
struct circle{
    point c;
    double r;
    circle(){
    }
    circle(point C, double R){
        c = C;
        r = R;
    }
    circle(double x, double y, double R){
        c = point(x, y);
        r = R;
    }
	circle operator +(point P){
	    return circle(c + P, r);
	}
	circle operator -(point P){
	    return circle(c - P, r);
	}
	circle& operator +=(point P){
        c += P;
        return *this;
	}
	circle& operator -=(point P){
        c -= P;
        return *this;
	}
    circle operator *(double k){
        return circle(c, r * k);
    }
    circle operator /(double k){
        return circle(c, r / k);
    }
    circle& operator *=(double k){
        r *= k;
        return *this;
    }
    circle& operator /=(double k){
        r /= k;
        return *this;
    }
    bool operator ==(circle C2){
        return c == C2.c && equals(r, C2.r);
    }
    bool operator !=(circle C2){
        return !(*this == C2);
    }
};
istream& operator >>(istream &is, circle &C){
    point P;
    double r;
    cin >> P >> r;
    C = circle(P, r);
    return is;
}
ostream& operator <<(ostream &os, circle C){
    cout << C.c << ' ' << C.r << endl;
    return os;
}
int circle_pos(circle C1, circle C2){
    double d = dist(C1.c, C2.c);
    if (sign(d - (C1.r + C2.r)) == 1){
        return 4;
    } else if (sign(d - (C1.r + C2.r)) == 0){
        return 3;
    } else if (sign(d - abs(C1.r - C2.r)) == 1){
        return 2;
    } else if (sign(d - abs(C1.r - C2.r)) == 0){
        return 1;
    } else {
        return 0;
    }
}
int main(){
  circle C1, C2;
  cin >> C1 >> C2;
  cout << circle_pos(C1, C2) << endl;
}


Measured memory_bytes: 3228