#include <iostream>
#include <math.h>



int main() {
    float x1 = 0;
    float y1 = 0;
    float r1 = 7;

    float x2 = 0;
    float y2 = 0;
    float r2 = 1;

    std::cin >> x1 >> y1 >> r1;
    std::cin >> x2 >> y2 >> r2;

    float d = sqrt(pow((x1 - x2),2) + pow((y1 - y2),2)); // TODO: provide type safety

    if((r1 + r2) < d){
        std::cout << 4 << std::endl;
    }
    else if((r1 + r2) > d){
        if(abs(r1 - r2) == d){
            std::cout << 1 << std::endl;
            return 0;
        }else if(abs(r1 - r2) > d){
            std::cout << 0 << std::endl;
            return 0;
        }
        std::cout << 2 << std::endl;
    }
    else std::cout << 3 << std::endl;

    return 0;
}
